diff --git a/examples/integration1-regular-nft.ts b/examples/integration1-regular-nft.ts index 1df0e6a30..f69189005 100644 --- a/examples/integration1-regular-nft.ts +++ b/examples/integration1-regular-nft.ts @@ -39,7 +39,6 @@ import assert from 'assert'; ////////////////////////////////////////////// const inst1 = await RegularNft.mint( - owner.pubkey, owner.secret, { filePath: asset.filePath!, diff --git a/examples/integration10-sbt-mint.ts b/examples/integration10-sbt-mint.ts index 85b9143bd..2e240dd09 100644 --- a/examples/integration10-sbt-mint.ts +++ b/examples/integration10-sbt-mint.ts @@ -39,7 +39,6 @@ import { requestSol } from 'test-tools'; ////////////////////////////////////////////// const inst1 = await RegularNft.mint( - owner.pubkey, owner.secret, { filePath: asset.filePath!, diff --git a/examples/integration11-compressed-nft.ts b/examples/integration11-compressed-nft.ts index c1547849e..7f9e97a43 100644 --- a/examples/integration11-compressed-nft.ts +++ b/examples/integration11-compressed-nft.ts @@ -43,7 +43,6 @@ import { requestSol } from 'test-tools'; await sleep(2); const spaceInst = await CompressedNft.createSpace( - owner.pubkey, owner.secret, abountMintTotal, { feePayer: feePayer.secret }, @@ -69,7 +68,6 @@ import { requestSol } from 'test-tools'; console.log('# demo data: ', asset); const collectionInst = await CompressedNft.mintCollection( - owner.pubkey, owner.secret, { filePath: asset.filePath!, @@ -102,7 +100,6 @@ import { requestSol } from 'test-tools'; // Usually set custom param const mintInst = await CompressedNft.mint( - owner.pubkey, owner.secret, { filePath: asset.filePath!, @@ -141,7 +138,6 @@ import { requestSol } from 'test-tools'; //transfer nftReceiver => receipt const transferInst = await CompressedNft.gasLessTransfer( mint, - nftReceiver.pubkey, nftReceiver.secret, receipt.pubkey, feePayer.pubkey, diff --git a/examples/integration2-spl-token-mint-transfer.ts b/examples/integration2-spl-token-mint-transfer.ts index ae614a670..71459a6d7 100644 --- a/examples/integration2-spl-token-mint-transfer.ts +++ b/examples/integration2-spl-token-mint-transfer.ts @@ -44,7 +44,6 @@ import { RandomAsset } from 'test-tools/setupAsset'; isMutable: false, }; const inst1 = await SplToken.mint( - owner.pubkey, owner.secret, totalAmount, decimals, diff --git a/examples/integration5-token-memo.ts b/examples/integration5-token-memo.ts index f1ca40b52..8f0d3d5ca 100644 --- a/examples/integration5-token-memo.ts +++ b/examples/integration5-token-memo.ts @@ -4,12 +4,7 @@ import assert from 'assert'; import { Airdrop } from '@solana-suite/airdrop'; -import { - Account, - Node, - Pubkey, - SplToken, -} from '@solana-suite/spl-token'; +import { Account, Node, Pubkey, SplToken } from '@solana-suite/spl-token'; import { Memo } from '@solana-suite/memo'; import { requestSol } from 'test-tools'; @@ -51,7 +46,6 @@ import { RandomAsset } from 'test-tools/setupAsset'; }; const inst1 = await SplToken.mint( - owner.pubkey, owner.secret, totalAmount, decimals, @@ -73,7 +67,7 @@ import { RandomAsset } from 'test-tools/setupAsset'; how much progress we have made over the past two years — and how much work remains `; - const inst2 = Memo.create(memoData, owner.pubkey, owner.secret); + const inst2 = Memo.create(memoData, owner.secret); (await [inst1, inst2].submit()).match( async (value) => { diff --git a/examples/integration7-transfer-to-users.ts b/examples/integration7-transfer-to-users.ts index cc5a783c0..b23a7c0e5 100644 --- a/examples/integration7-transfer-to-users.ts +++ b/examples/integration7-transfer-to-users.ts @@ -60,7 +60,6 @@ const SLEEP_TIME_WAIT = 0; }; const inst1 = await SplToken.mint( - owner.pubkey, owner.secret, totalAmount, decimals, diff --git a/examples/integration8-gas-less-transfer.ts b/examples/integration8-gas-less-transfer.ts index 33963d352..746304e12 100644 --- a/examples/integration8-gas-less-transfer.ts +++ b/examples/integration8-gas-less-transfer.ts @@ -36,9 +36,8 @@ import { RandomAsset } from 'test-tools/setupAsset'; ////////////////////////////////////////////// const inst = await SolNative.gasLessTransfer( - owner.pubkey, + owner.secret, dest.pubkey, - [owner.secret], 0.001, feePayer.pubkey, ); @@ -72,7 +71,6 @@ import { RandomAsset } from 'test-tools/setupAsset'; }; const mintInst = await SplToken.mint( - tokenOwner.pubkey, tokenOwner.secret, 10000, decimals, @@ -84,9 +82,8 @@ import { RandomAsset } from 'test-tools/setupAsset'; const inst2 = await SplToken.gasLessTransfer( mintInst.unwrap().data as Pubkey, - tokenOwner.pubkey, + tokenOwner.secret, dest.pubkey, - [tokenOwner.secret], 100, decimals, feePayer.pubkey, diff --git a/examples/integration9-gas-less-mint.ts b/examples/integration9-gas-less-mint.ts index d6cab87f5..6b2211aa1 100644 --- a/examples/integration9-gas-less-mint.ts +++ b/examples/integration9-gas-less-mint.ts @@ -40,7 +40,6 @@ import { Account, RegularNft } from '@solana-suite/regular-nft'; }; const inst = await RegularNft.gasLessMint( - owner.pubkey, owner.secret, metadata, feePayer.pubkey, diff --git a/packages/account/test/associated.test.ts b/packages/account/test/associated.test.ts index 2c1ecd69c..33f03be66 100644 --- a/packages/account/test/associated.test.ts +++ b/packages/account/test/associated.test.ts @@ -19,13 +19,7 @@ test.before(async () => { }); test('Retry getOrCreate', async (t) => { - const mintInst = await SplToken.mint( - source.pubkey, - source.secret, - 10000, - 1, - TOKEN_METADATA, - ); + const mintInst = await SplToken.mint(source.secret, 10000, 1, TOKEN_METADATA); await mintInst.submit(); diff --git a/packages/suite-airdrop/dist/index.d.mts b/packages/suite-airdrop/dist/index.d.mts index 6973c0c5f..3636615d3 100644 --- a/packages/suite-airdrop/dist/index.d.mts +++ b/packages/suite-airdrop/dist/index.d.mts @@ -252,6 +252,13 @@ type AirdropOptions = { }; declare namespace Airdrop { + /** + * Reuqest airdrop SOL + * only devnet, testnet + * + * @param {Pubkey} pubkey + * @return Promise> + */ const request: (pubkey: Pubkey, options?: Partial) => Promise>; } diff --git a/packages/suite-airdrop/dist/index.d.ts b/packages/suite-airdrop/dist/index.d.ts index 6973c0c5f..3636615d3 100644 --- a/packages/suite-airdrop/dist/index.d.ts +++ b/packages/suite-airdrop/dist/index.d.ts @@ -252,6 +252,13 @@ type AirdropOptions = { }; declare namespace Airdrop { + /** + * Reuqest airdrop SOL + * only devnet, testnet + * + * @param {Pubkey} pubkey + * @return Promise> + */ const request: (pubkey: Pubkey, options?: Partial) => Promise>; } diff --git a/packages/suite-airdrop/dist/index.js b/packages/suite-airdrop/dist/index.js index 97f251e5a..1608b5350 100644 --- a/packages/suite-airdrop/dist/index.js +++ b/packages/suite-airdrop/dist/index.js @@ -1573,4 +1573,4 @@ var Airdrop; 0 && (module.exports = { Airdrop }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvY29uc3RhbnRzLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2JhdGNoLnRzIiwgIi4uLy4uL25vZGUvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbW1vbi50cyIsICIuLi8uLi9zaGFyZWQvc3JjL3NoYXJlZC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9taW50LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3BhcnRpYWwtc2lnbi50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jYWxjdWxhdGUtdHhzaXplLnRzIiwgIi4uLy4uL2dsb2JhbC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvYXNzb2NpYXRlZC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9rZXlwYWlyLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL3BkYS50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9pbmRleC50cyIsICIuLi8uLi9zaGFyZWQvc3JjL3Jlc3VsdC50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NvbGxlY3Rpb24udHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9jcmVhdG9yc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dXJuIGluc3Q7XG4gICAgICAgICAgfSBlbHNlIGlmIChpbnN0IGluc3RhbmNlb2YgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbikge1xuICAgICAgICAgICAgKGF3YWl0IGluc3Quc3VibWl0KCkpLm1hcChcbiAgICAgICAgICAgICAgYXN5bmMgKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZWF0ZSB0b2tlbiBhY2NvdW50OiBgLCBlKTtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyBtaW50OiAke21pbnR9LCBvd25lcjogJHtvd25lcn0sIGZlZVBheWVyOiAke2ZlZVBheWVyfWApO1xuICAgICAgICB9XG4gICAgICAgIGF3YWl0IHNsZWVwKFJFVFJZX1NMRUVQX1RJTUUpO1xuICAgICAgICBjb3VudGVyKys7XG4gICAgICB9XG4gICAgICB0aHJvdyBFcnJvcihgcmV0cnkgYWN0aW9uIGlzIG92ZXIgbGltaXQgJHtSRVRSWV9PVkVSX0xJTUlUfWApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBbTWFpbiBsb2dpY11HZXQgQXNzb2NpYXRlZCB0b2tlbiBBY2NvdW50LlxuICAgICAqIGlmIG5vdCBjcmVhdGVkLCBj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VjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc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PT4ge1xuICAgICAgaWYgKCFpbnB1dCkge1xuICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dC5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Db21wcmVzc2VkTmZ0SW5mcmEgPSAoXG4gICAgICBpbnB1dDogT3B0aW9uPElucHV0Q3JlYXRvcnNbXT4gfCB1bmRlZmluZWQsXG4gICAgKTogSW50ZXJuYWxDcmVhdG9yc1tdID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIFtdO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0IS5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKFxuICAgICAgb3V0cHV0OiBPcHRpb248SW50ZXJuYWxDcmVhdG9yc1tdPixcbiAgICApOiBDcmVhdG9yc1tdIHwgdW5kZWZpbmVkID0+IHtcbiAgICAgIGlmICghb3V0cHV0KSB7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBvdXRwdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB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ZSxcbiAgICAgICAgZmVlUGF5ZXI/OiBTZWNyZXQsXG4gICAgICApID0+IFByb21pc2U8UmVzdWx0PHN0cmluZywgRXJyb3I+PixcbiAgICAgIHN0b3JhZ2VUeXBlOiBTdG9yYWdlVHlwZSxcbiAgICAgIGZlZVBheWVyPzogU2VjcmV0LFxuICAgICk6IFByb21pc2U8UHJvcGVydGllcz4gPT4ge1xuICAgICAgaWYgKCFpbnB1dCB8fCAhaW5wdXQuZmlsZXMpIHtcbiAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgfVxuXG4gICAgICBjb25zdCBmaWxlcyA9IGF3YWl0IFByb21pc2UuYWxsKFxuICAgICAgICBpbnB1dC5maWxlcy5tYXAoYXN5bmMgKGZpbGUpID0+IHtcbiAgICAgICAgICBpZiAoIWZpbGUuZmlsZVBhdGgpIHtcbiAgICAgICAgICAgIHJldHVybiB7fTtcbiAgICAgICAgICB9XG4gICAgICAgICAgY29uc3QgcmVzID0gYXdhaXQgY2FsbGJhY2tGdW5jKGZpbGUuZmlsZVBhdGgsIHN0b3JhZ2VUeXBlLCBmZWVQYXllcik7XG4gICAgICAgICAgaWYgKHJlcy5pc0Vycikge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IocmVzLmVycm9yLm1lc3NhZ2UpO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gb3ZlcndyaXRlT2JqZWN0KGZpbGUsIFtcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgZXhpc3RzS2V5OiAnZmlsZVBhdGgnLFxuICAgICAgICAgICAgICB3aWxsOiB7IGtleTogJ3VyaScsIHZhbHVlOiByZXMudmFsdWUgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgXSk7XG4gICAgICAgIH0pLFxuICAgICAgKTtcbiAgICAgIHJldHVybiB7IC4uLmlucHV0LCBmaWxlcyB9IGFzIFByb3BlcnRpZXM7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IFBhcnNlZFRy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wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9XG4gICAgICAgICAgJ0NhdWdodCBpbiB0aGUgdmFsaWRhdGlvbiBlcnJvcnMuIHNlZSBpbmZvcm1hdGlvbiBlLmc6IGVycjxWYWxpZGF0b3JFcnJvcj4uZGV0YWlscyc7XG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tcbiAgZXhwb3J0IGNsYXNzIEJhdGNoIHtcbiAgICBzdWJtaXQgPSBhc3luYyAoXG4gICAgICBhcnI6IENvbW1vbi5Db21tb25bXSB8IE1pbnQuTWludFtdLFxuICAgICk6IFByb21pc2U8UmVzdWx0PFRyYW5zYWN0aW9uU2lnbmF0dXJlLCBFcnJvcj4+ID0+IHtcbiAgICAgIHJldHVybiBUcnkoYXN5bmMgKCkgPT4ge1xuICAgICAgICBsZXQgaSA9IDA7XG4gICAgICAgIGZvciAoY29uc3QgYSBvZiBhcnIpIHtcbiAgICAgICAgICBpZiAoIWEuaW5zdHJ1Y3Rpb25zICYmICFhLnNpZ25lcnMpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKFxuICAgICAgICAgICAgICBgb25seSBJbnN0cnVjdGlvbiBvYmplY3QgdGhhdCBjYW4gdXNlIGJhdGNoU3VibWl0KCkuXG4gICAgICAgICAgICBJbmRleDogJHtpfSwgU2V0IHZhbHVlOiAke0pTT04uc3RyaW5naWZ5KGEpfWAsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpKys7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5pbnN0cnVjdGlvbnMpO1xuICAgICAgICBjb25zdCBzaWduZXJzID0gYXJyLmZsYXRNYXAoKGEpID0+IGEuc2lnbmVycyk7XG4gICAgICAgIGNvbnN0IGZlZVBheWVycyA9IGFyci5maWx0ZXIoKGEpID0+IGEuZmVlUGF5ZXIgIT09IHVuZGVmaW5lZCk7XG4gICAgICAgIGxldCBmZWVQYXllciA9IHNpZ25lcnNbMF07XG4gICAgICAgIGlmIChmZWVQYXllcnMubGVuZ3RoID4gMCAmJiBmZWVQYXllcnNbMF0uZmVlUGF5ZXIpIHtcbiAgICAgICAgICBmZWVQYXllciA9IGZlZVBheWVyc1swXS5mZWVQYXllcjtcbiAgICAgICAgfVxuXG4gIC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1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZWF0ZSB0b2tlbiBhY2NvdW50OiBgLCBlKTtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyBtaW50OiAke21pbnR9LCBvd25lcjogJHtvd25lcn0sIGZlZVBheWVyOiAke2ZlZVBheWVyfWApO1xuICAgICAgICB9XG4gICAgICAgIGF3YWl0IHNsZWVwKFJFVFJZX1NMRUVQX1RJTUUpO1xuICAgICAgICBjb3VudGVyKys7XG4gICAgICB9XG4gICAgICB0aHJvdyBFcnJvcihgcmV0cnkgYWN0aW9uIGlzIG92ZXIgbGltaXQgJHtSRVRSWV9PVkVSX0xJTUlUfWApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBbTWFpbiBsb2dpY11HZXQgQXNzb2NpYXRlZCB0b2tlbiBBY2NvdW50LlxuICAgICAqIGlmIG5vdCBjcmVhdGVkLCBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCBtYWtlT3JDcmVhdGVJbnN0cnVjdGlvbiA9IGFzeW5jIChcbiAgICAgIG1pbnQ6IFB1YmtleSxcbiAgICAgIG93bmVyOiBQdWJrZXksXG4gICAgICBmZWVQYXllcj86IFB1YmtleSxcbiAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSA9IGZhbHNlLFxuICAgICk6IFByb21pc2U8e1xuICAgICAgdG9rZW5BY2NvdW50OiBzdHJpbmc7XG4gICAgICBpbnN0OiBUcmFuc2FjdGlvbkluc3RydWN0aW9uIHwgdW5kZWZpbmVkO1xuICAgIH0+ID0+IHtcbiAgICAgIGNvbnN0IGFzc29jaWF0ZWRUb2tlbkFjY291bnQgPSBnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyhcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0LFxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQgeyBLZXlwYWlyIGFzIE9yaWdpbmFsLCBQdWJsaWNLZXkgfSBmcm9tICdAc29sYW5hL3dlYjMuanMnO1xuaW1wb3J0IHsgUHVia2V5LCBTZWNyZXQgfSBmcm9tICd+L3R5cGVzL2FjY291bnQnO1xuaW1wb3J0IGJzIGZyb20gJ2JzNTgnO1xuXG5leHBvcnQgbmFtZXNwYWNlIEFjY291bnQge1xuICBleHBvcnQgY2xhc3MgS2V5cGFpciB7XG4gICAgc2V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yIiwgIlRva2VuTWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlJlZ3VsYXJOZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUHJvcGVydGllcyIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXJDaGVja2VkIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlciIsICJDb252ZXJ0ZXIiLCAiVmFsaWRhdG9yIiwgIk1lc3NhZ2UiLCAiQ29udmVydGVyIiwgIkFpcmRyb3AiXQp9Cg== \ No newline at end of file diff --git a/packages/suite-airdrop/dist/index.mjs b/packages/suite-airdrop/dist/index.mjs index 7a4cdf4ce..76e6b94da 100644 --- a/packages/suite-airdrop/dist/index.mjs +++ b/packages/suite-airdrop/dist/index.mjs @@ -1558,4 +1558,4 @@ var Airdrop; export { Airdrop }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc2hhcmVkL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvc2hhcmVkLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NhbGN1bGF0ZS10eHNpemUudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9hc3NvY2lhdGVkLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vY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AgICAgICAgfSBlbHNlIGlmIChpbnN0IGluc3RhbmNlb2YgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbikge1xuICAgICAgICAgICAgKGF3YWl0IGluc3Quc3VibWl0KCkpLm1hcChcbiAgICAgICAgICAgICAgYXN5bmMgKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZWF0ZSB0b2tlbiBhY2NvdW50OiBgLCBlKTtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyBtaW50OiAke21pbnR9LCBvd25lcjogJHtvd25lcn0sIGZlZVBheWVyOiAke2ZlZVBheWVyfWApO1xuICAgICAgICB9XG4gICAgICAgIGF3YWl0IHNsZWVwKFJFVFJZX1NMRUVQX1RJTUUpO1xuICAgICAgICBjb3VudGVyKys7XG4gICAgICB9XG4gICAgICB0aHJvdyBFcnJvcihgcmV0cnkgYWN0aW9uIGlzIG92ZXIgbGltaXQgJHtSRVRSWV9PVkVSX0xJTUlUfWApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBbTWFpbiBsb2dpY11HZXQgQXNzb2NpYXRlZCB0b2tlbiBBY2NvdW50LlxuICAgICAqIGlmIG5vdCBjcmVhdGVkLCBjcmVhdGUgbmV3IHRva2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AgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbk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gKCFpbnB1dCkge1xuICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dC5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Db21wcmVzc2VkTmZ0SW5mcmEgPSAoXG4gICAgICBpbnB1dDogT3B0aW9uPElucHV0Q3JlYXRvcnNbXT4gfCB1bmRlZmluZWQsXG4gICAgKTogSW50ZXJuYWxDcmVhdG9yc1tdID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIFtdO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0IS5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKFxuICAgICAgb3V0cHV0OiBPcHRpb248SW50ZXJuYWxDcmVhdG9yc1tdPixcbiAgICApOiBDcmVhdG9yc1tdIHwgdW5kZWZpbmVkID0+IHtcbiAgICAgIGlmICghb3V0cHV0KSB7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBvdXRwdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWR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AgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9XG4gICAgICAgICAgJ0NhdWdodCBpbiB0aGUgdmFsaWRhdGlvbiBlcnJvcnMuIHNlZSBpbmZvcm1hdGlvbiBlLmc6IGVycjxWYWxpZGF0b3JFcnJvcj4uZGV0YWlscyc7XG4gICAgICAgIHRocm93IG5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gKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZWF0ZSB0b2tlbiBhY2NvdW50OiBgLCBlKTtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyBtaW50OiAke21pbnR9LCBvd25lcjogJHtvd25lcn0sIGZlZVBheWVyOiAke2ZlZVBheWVyfWApO1xuICAgICAgICB9XG4gICAgICAgIGF3YWl0IHNsZWVwKFJFVFJZX1NMRUVQX1RJTUUpO1xuICAgICAgICBjb3VudGVyKys7XG4gICAgICB9XG4gICAgICB0aHJvdyBFcnJvcihgcmV0cnkgYWN0aW9uIGlzIG92ZXIgbGltaXQgJHtSRVRSWV9PVkVSX0xJTUlUfWApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBbTWFpbiBsb2dpY11HZXQgQXNzb2NpYXRlZCB0b2tlbiBBY2NvdW50LlxuICAgICAqIGlmIG5vdCBjcmVhdGVkLCBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5z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1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0LFxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQgeyBLZXlwYWlyIGFzIE9yaWdpbmFsLCBQdWJsaWNLZXkgfSBm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FkZHJlc3MudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Db21wcmVzc2VkTmZ0SW5mcmEgPSAoXG4gICAgICBpbnB1dDogT3B0aW9uPElucHV0Q3JlYXRvcnNbXT4gfCB1bmRlZmluZWQsXG4gICAgKTogSW50ZXJuYWxDcmVhdG9yc1tdID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIFtdO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0IS5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKFxuICAgICAgb3V0cHV0OiBPcHRpb248SW50ZXJuYWxDcmVhdG9yc1tdPixcbiAgICApOiBDcmVhdG9yc1tdIHwgdW5kZWZpbmVkID0+IHtcbiAgICAgIGlmICghb3V0cHV0KSB7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBvdXRwdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvU3RyaW5nKCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGRhdGEudmVyaWZpZWQsXG4gICAgICAgIH07XG4gICAgICB9KTtcb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ICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9XG4gICAgICAgICAgJ0NhdWdodCBpbiB0aGUgdmFsaWRhdGlvbiBlcnJvcnMuIHNlZSBpbmZvcm1hdGlvbiBlLmc6IGVycjxWYWxpZGF0b3JFcnJvcj4uZGV0YWlscyc7XG4gICAgICAgIHRocm93IG5ldyBWYWxpZGF0b3JFcnJvcihtZXNzYWdlLCByZXN1bHRzKTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBNZXNzYWdlLlNVQ0NFU1M7XG4gICAgfSk7XG4gIH07XG5cbiAgdHlwZSBQaWNrTmZ0U3RvcmFnZ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xzIiwgIkNvbnZlcnRlciIsICJVc2VzIiwgIkNvbnZlcnRlciIsICJUb2tlbk1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJSZWd1bGFyTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlByb3BlcnRpZXMiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyQ2hlY2tlZCIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXIiLCAiQ29udmVydGVyIiwgIlZhbGlkYXRvciIsICJNZXNzYWdlIiwgIkNvbnZlcnRlciIsICJBaXJkcm9wIl0KfQo= \ No newline at end of file diff --git a/packages/suite-airdrop/src/index.ts b/packages/suite-airdrop/src/index.ts index c78dbbfe5..fabd13b32 100644 --- a/packages/suite-airdrop/src/index.ts +++ b/packages/suite-airdrop/src/index.ts @@ -7,6 +7,13 @@ export namespace Airdrop { const DEFAULT_AIRDROP_AMOUNT = 1; const MAX_AIRDROP_SOL = 2; + /** + * Reuqest airdrop SOL + * only devnet, testnet + * + * @param {Pubkey} pubkey + * @return Promise> + */ export const request = async ( pubkey: Pubkey, options: Partial = {}, diff --git a/packages/suite-compressed-nft/dist/index.d.mts b/packages/suite-compressed-nft/dist/index.d.mts index 818b1f1ad..7799ad193 100644 --- a/packages/suite-compressed-nft/dist/index.d.mts +++ b/packages/suite-compressed-nft/dist/index.d.mts @@ -730,27 +730,25 @@ declare namespace CompressedNft$1 { * create a new markle tree * This function needs only 1 call * - * @param {Pubkey} owner - * @param {Secret} signer + * @param {Secret} owner * @param {number} maxDepth * @param {number} maxBufferSize * @param {number} canopyDepth * @param {Partial} options * @return Promise> */ - const initSpace: (owner: Pubkey$1, signer: Secret, maxDepth: number, maxBufferSize: number, canopyDepth: number, options?: Partial) => Promise>; + const initSpace: (owner: Secret, maxDepth: number, maxBufferSize: number, canopyDepth: number, options?: Partial) => Promise>; /** * create a new nft space * This function needs only 1 call * - * @param {Pubkey} owner - * @param {Secret} signer + * @param {Secret} owner * @param {number} spaceSize * @param {Partial} options * * @return Promise> */ - const createSpace: (owner: Pubkey$1, signer: Secret, spaceSize: number, options?: Partial) => Promise>; + const createSpace: (owner: Secret, spaceSize: number, options?: Partial) => Promise>; /** * Calculate space cost * @@ -764,24 +762,24 @@ declare namespace CompressedNft$1 { declare const CompressedNft: { createTransfer: (assetId: Pubkey$1, assetIdOwner: Pubkey$1, dest: Pubkey$1, delegate?: Pubkey$1 | undefined) => Promise<_solana_web3_js.TransactionInstruction>; - transfer: (assetId: Pubkey$1, assetIdOwner: Pubkey$1, dest: Pubkey$1, signers: Secret[]) => Promise>; - mintCollection: (owner: Pubkey$1, signer: Secret$1, input: InputNftMetadata, options?: Partial) => Promise>; + transfer: (mint: Pubkey$1, owner: Pubkey$1, dest: Pubkey$1, ownerOrMultisig: Secret[]) => Promise>; + mintCollection: (owner: Secret$1, input: InputNftMetadata, options?: Partial) => Promise>; Space: typeof CompressedNft$1.Space; - initSpace: (owner: Pubkey$1, signer: Secret, maxDepth: number, maxBufferSize: number, canopyDepth: number, options?: Partial) => Promise>; - createSpace: (owner: Pubkey$1, signer: Secret, spaceSize: number, options?: Partial) => Promise>; + initSpace: (owner: Secret, maxDepth: number, maxBufferSize: number, canopyDepth: number, options?: Partial) => Promise>; + createSpace: (owner: Secret, spaceSize: number, options?: Partial) => Promise>; calculateSpaceCost: (spaceSize: number) => Promise<{ sol: number; }>; createVerifyCreator: (creators: mpl_bubblegum_instruction.Creator[], assetId: _solana_web3_js.PublicKey, treeOwner: _solana_web3_js.PublicKey, metadata: mpl_bubblegum_instruction.MetadataArgs, feePayer: _solana_web3_js.PublicKey) => Promise<_solana_web3_js.TransactionInstruction>; - mint: (owner: Pubkey$1, signer: Secret$1, input: InputNftMetadata, treeOwner: Pubkey$1, collectionMint: Pubkey$1, options?: Partial) => Promise, Error>>; - gasLessTransfer: (mint: Pubkey$1, owner: Pubkey$1, signer: Secret$1, dest: Pubkey$1, feePayer: Pubkey$1) => Promise[]>; - gasLessDelegate: (assetId: Pubkey$1, assetIdOwner: Secret$1, newDelegate: Pubkey$1) => Promise>; + mint: (owner: Secret$1, input: InputNftMetadata, treeOwner: Pubkey$1, collectionMint: Pubkey$1, options?: Partial) => Promise, Error>>; + gasLessTransfer: (mint: Pubkey$1, owner: Secret$1, dest: Pubkey$1, feePayer: Pubkey$1) => Promise[]>; + gasLessDelegate: (mint: Pubkey$1, owner: Secret$1, newDelegate: Pubkey$1) => Promise>; defaultSortBy: Sortable; findByOwner: (owner: Pubkey, options?: Partial) => Promise>; findByMint: (mint: Pubkey) => Promise>; findByCollection: (collectionMint: Pubkey, options?: Partial) => Promise>; createDeleagate: (assetId: _solana_web3_js.PublicKey, newDelegate: _solana_web3_js.PublicKey | null) => Promise<_solana_web3_js.TransactionInstruction>; - setDelegate: (assetId: Pubkey$1, signer: Secret$1, options?: Partial) => Promise>; + setDelegate: (mint: Pubkey$1, owner: Secret$1, options?: Partial) => Promise>; }; export { Account, CompressedNft, Explorer, ExplorerOptions, FilterOptions, FilterType, KeypairAccount, Memo, MintTo, MintToChecked, ModuleName, Node, OwnerInfo, PostTokenAccount, Pubkey$1 as Pubkey, Secret$1 as Secret, Transfer, TransferChecked, Try, Validator, ValidatorError, WithMemo, bufferToArray, convertTimestampToDateTime, debugLog, isBrowser, isNode, isPromise, overwriteObject, sleep, unixTimestamp }; diff --git a/packages/suite-compressed-nft/dist/index.d.ts b/packages/suite-compressed-nft/dist/index.d.ts index 818b1f1ad..7799ad193 100644 --- a/packages/suite-compressed-nft/dist/index.d.ts +++ b/packages/suite-compressed-nft/dist/index.d.ts @@ -730,27 +730,25 @@ declare namespace CompressedNft$1 { * create a new markle tree * This function needs only 1 call * - * @param {Pubkey} owner - * @param {Secret} signer + * @param {Secret} owner * @param {number} maxDepth * @param {number} maxBufferSize * @param {number} canopyDepth * @param {Partial} options * @return Promise> */ - const initSpace: (owner: Pubkey$1, signer: Secret, maxDepth: number, maxBufferSize: number, canopyDepth: number, options?: Partial) => Promise>; + const initSpace: (owner: Secret, maxDepth: number, maxBufferSize: number, canopyDepth: number, options?: Partial) => Promise>; /** * create a new nft space * This function needs only 1 call * - * @param {Pubkey} owner - * @param {Secret} signer + * @param {Secret} owner * @param {number} spaceSize * @param {Partial} options * * @return Promise> */ - const createSpace: (owner: Pubkey$1, signer: Secret, spaceSize: number, options?: Partial) => Promise>; + const createSpace: (owner: Secret, spaceSize: number, options?: Partial) => Promise>; /** * Calculate space cost * @@ -764,24 +762,24 @@ declare namespace CompressedNft$1 { declare const CompressedNft: { createTransfer: (assetId: Pubkey$1, assetIdOwner: Pubkey$1, dest: Pubkey$1, delegate?: Pubkey$1 | undefined) => Promise<_solana_web3_js.TransactionInstruction>; - transfer: (assetId: Pubkey$1, assetIdOwner: Pubkey$1, dest: Pubkey$1, signers: Secret[]) => Promise>; - mintCollection: (owner: Pubkey$1, signer: Secret$1, input: InputNftMetadata, options?: Partial) => Promise>; + transfer: (mint: Pubkey$1, owner: Pubkey$1, dest: Pubkey$1, ownerOrMultisig: Secret[]) => Promise>; + mintCollection: (owner: Secret$1, input: InputNftMetadata, options?: Partial) => Promise>; Space: typeof CompressedNft$1.Space; - initSpace: (owner: Pubkey$1, signer: Secret, maxDepth: number, maxBufferSize: number, canopyDepth: number, options?: Partial) => Promise>; - createSpace: (owner: Pubkey$1, signer: Secret, spaceSize: number, options?: Partial) => Promise>; + initSpace: (owner: Secret, maxDepth: number, maxBufferSize: number, canopyDepth: number, options?: Partial) => Promise>; + createSpace: (owner: Secret, spaceSize: number, options?: Partial) => Promise>; calculateSpaceCost: (spaceSize: number) => Promise<{ sol: number; }>; createVerifyCreator: (creators: mpl_bubblegum_instruction.Creator[], assetId: _solana_web3_js.PublicKey, treeOwner: _solana_web3_js.PublicKey, metadata: mpl_bubblegum_instruction.MetadataArgs, feePayer: _solana_web3_js.PublicKey) => Promise<_solana_web3_js.TransactionInstruction>; - mint: (owner: Pubkey$1, signer: Secret$1, input: InputNftMetadata, treeOwner: Pubkey$1, collectionMint: Pubkey$1, options?: Partial) => Promise, Error>>; - gasLessTransfer: (mint: Pubkey$1, owner: Pubkey$1, signer: Secret$1, dest: Pubkey$1, feePayer: Pubkey$1) => Promise[]>; - gasLessDelegate: (assetId: Pubkey$1, assetIdOwner: Secret$1, newDelegate: Pubkey$1) => Promise>; + mint: (owner: Secret$1, input: InputNftMetadata, treeOwner: Pubkey$1, collectionMint: Pubkey$1, options?: Partial) => Promise, Error>>; + gasLessTransfer: (mint: Pubkey$1, owner: Secret$1, dest: Pubkey$1, feePayer: Pubkey$1) => Promise[]>; + gasLessDelegate: (mint: Pubkey$1, owner: Secret$1, newDelegate: Pubkey$1) => Promise>; defaultSortBy: Sortable; findByOwner: (owner: Pubkey, options?: Partial) => Promise>; findByMint: (mint: Pubkey) => Promise>; findByCollection: (collectionMint: Pubkey, options?: Partial) => Promise>; createDeleagate: (assetId: _solana_web3_js.PublicKey, newDelegate: _solana_web3_js.PublicKey | null) => Promise<_solana_web3_js.TransactionInstruction>; - setDelegate: (assetId: Pubkey$1, signer: Secret$1, options?: Partial) => Promise>; + setDelegate: (mint: Pubkey$1, owner: Secret$1, options?: Partial) => Promise>; }; export { Account, CompressedNft, Explorer, ExplorerOptions, FilterOptions, FilterType, KeypairAccount, Memo, MintTo, MintToChecked, ModuleName, Node, OwnerInfo, PostTokenAccount, Pubkey$1 as Pubkey, Secret$1 as Secret, Transfer, TransferChecked, Try, Validator, ValidatorError, WithMemo, bufferToArray, convertTimestampToDateTime, debugLog, isBrowser, isNode, isPromise, overwriteObject, sleep, unixTimestamp }; diff --git a/packages/suite-compressed-nft/dist/index.js b/packages/suite-compressed-nft/dist/index.js index 6732bfc96..7518ebbf0 100644 --- a/packages/suite-compressed-nft/dist/index.js +++ b/packages/suite-compressed-nft/dist/index.js @@ -1721,11 +1721,11 @@ var CompressedNft; } ); }; - CompressedNft10.setDelegate = async (assetId, signer, options = {}) => { + CompressedNft10.setDelegate = async (mint, owner, options = {}) => { return Try(async () => { const newDelegate = options.delegate ? options.delegate.toPublicKey() : null; - const inst = await (0, CompressedNft10.createDeleagate)(assetId.toPublicKey(), newDelegate); - return new TransactionBuilder6.Common([inst], [signer.toKeypair()]); + const inst = await (0, CompressedNft10.createDeleagate)(mint.toPublicKey(), newDelegate); + return new TransactionBuilder6.Common([inst], [owner.toKeypair()]); }); }; })(CompressedNft || (CompressedNft = {})); @@ -1858,10 +1858,10 @@ var CompressedNft2; var import_web310 = require("@solana/web3.js"); var CompressedNft3; ((CompressedNft10) => { - CompressedNft10.gasLessDelegate = async (assetId, assetIdOwner, newDelegate) => { + CompressedNft10.gasLessDelegate = async (mint, owner, newDelegate) => { return Try(async () => { const inst = await CompressedNft.createDeleagate( - assetId.toPublicKey(), + mint.toPublicKey(), newDelegate.toPublicKey() ); const blockhashObj = await Node.getConnection().getLatestBlockhash(); @@ -1871,7 +1871,7 @@ var CompressedNft3; feePayer: newDelegate.toPublicKey() }); tx.add(inst); - tx.partialSign(assetIdOwner.toKeypair()); + tx.partialSign(owner.toKeypair()); tx.recentBlockhash = blockhashObj.blockhash; return new TransactionBuilder6.PartialSign( tx.serialize({ @@ -1954,10 +1954,10 @@ var CompressedNft4; } ); }; - CompressedNft10.transfer = async (assetId, assetIdOwner, dest, signers) => { + CompressedNft10.transfer = async (mint, owner, dest, ownerOrMultisig) => { return Try(async () => { - const keypairs = signers.map((s) => s.toKeypair()); - const inst = await (0, CompressedNft10.createTransfer)(assetId, assetIdOwner, dest); + const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); + const inst = await (0, CompressedNft10.createTransfer)(mint, owner, dest); return new TransactionBuilder6.Common([inst], keypairs); }); }; @@ -1966,8 +1966,8 @@ var CompressedNft4; // src/gas-less-transfer.ts var CompressedNft5; ((CompressedNft10) => { - CompressedNft10.gasLessTransfer = async (mint, owner, signer, dest, feePayer) => { - const delegate = await CompressedNft3.gasLessDelegate(mint, signer, feePayer); + CompressedNft10.gasLessTransfer = async (mint, owner, dest, feePayer) => { + const delegate = await CompressedNft3.gasLessDelegate(mint, owner, feePayer); delegate.unwrap().canSubmit = true; const transfer = await Try(async () => { const blockhashObj = await Node.getConnection().getLatestBlockhash(); @@ -1976,7 +1976,14 @@ var CompressedNft5; blockhash: blockhashObj.blockhash, feePayer: feePayer.toPublicKey() }); - inst.add(await CompressedNft4.createTransfer(mint, owner, dest, feePayer)); + inst.add( + await CompressedNft4.createTransfer( + mint, + new Account4.Keypair({ secret: owner }).pubkey, + dest, + feePayer + ) + ); inst.recentBlockhash = blockhashObj.blockhash; return new TransactionBuilder6.PartialSign( inst.serialize({ @@ -2230,9 +2237,9 @@ var CompressedNft6; }; } CompressedNft10.Space = Space; - CompressedNft10.initSpace = (owner, signer, maxDepth, maxBufferSize, canopyDepth, options = {}) => { + CompressedNft10.initSpace = (owner, maxDepth, maxBufferSize, canopyDepth, options = {}) => { return Try(async () => { - const payer = options.feePayer ? options.feePayer : signer; + const payer = options.feePayer ? options.feePayer : owner; const treeOwner = Account4.Keypair.create(); const space = (0, import_spl_account_compression3.getConcurrentMerkleTreeAccountSize)( maxDepth, @@ -2263,7 +2270,7 @@ var CompressedNft6; { merkleTree: treeOwner.toKeypair().publicKey, treeAuthority, - treeCreator: owner.toPublicKey(), + treeCreator: owner.toKeypair().publicKey, payer: payer.toKeypair().publicKey, logWrapper: import_spl_account_compression3.SPL_NOOP_PROGRAM_ID, compressionProgram: import_spl_account_compression3.SPL_ACCOUNT_COMPRESSION_PROGRAM_ID @@ -2278,22 +2285,15 @@ var CompressedNft6; ); return new TransactionBuilder6.Mint( instructions, - [treeOwner.toKeypair(), signer.toKeypair()], + [treeOwner.toKeypair(), owner.toKeypair()], payer.toKeypair(), treeOwner.pubkey ); }); }; - CompressedNft10.createSpace = async (owner, signer, spaceSize, options = {}) => { + CompressedNft10.createSpace = async (owner, spaceSize, options = {}) => { const { maxDepth, maxBufferSize, canopyDepth } = calculateSpaceNumberToDepth(spaceSize); - return (0, CompressedNft10.initSpace)( - owner, - signer, - maxDepth, - maxBufferSize, - canopyDepth, - options - ); + return (0, CompressedNft10.initSpace)(owner, maxDepth, maxBufferSize, canopyDepth, options); }; CompressedNft10.calculateSpaceCost = async (spaceSize) => { const { maxDepth, maxBufferSize, canopyDepth } = calculateSpaceNumberToDepth(spaceSize); @@ -2371,16 +2371,17 @@ var CompressedNft7; } ); }; - CompressedNft10.mint = async (owner, signer, input, treeOwner, collectionMint, options = {}) => { + CompressedNft10.mint = async (owner, input, treeOwner, collectionMint, options = {}) => { return Try(async () => { const valid = Validator.checkAll(input); if (valid.isErr) { throw valid.error; } const { feePayer, receiver, delegate } = options; - const payer = feePayer ? feePayer : signer; + const payer = feePayer ? feePayer : owner; const storageType = input.storageType || DEFAULT_STORAGE_TYPE; - const leafOwner = receiver ? receiver : owner; + const ownerPublicKey = owner.toKeypair().publicKey; + const leafOwner = receiver ? receiver.toPublicKey() : ownerPublicKey; const leafDelegate = delegate ? delegate : new Account4.Keypair({ secret: payer }).pubkey; const treeAuthority = Account4.Pda.getTreeAuthority( treeOwner.toPublicKey().toString() @@ -2457,12 +2458,12 @@ var CompressedNft7; { merkleTree: treeOwner.toPublicKey(), treeAuthority, - treeDelegate: owner.toPublicKey(), + treeDelegate: ownerPublicKey, payer: payer.toKeypair().publicKey, - leafOwner: leafOwner.toPublicKey(), + leafOwner, // receiver leafDelegate: leafDelegate.toPublicKey(), - collectionAuthority: owner.toPublicKey(), + collectionAuthority: ownerPublicKey, collectionMint: collectionMint.toPublicKey(), collectionMetadata, editionAccount: collectionMasterEditionAccount, @@ -2491,7 +2492,7 @@ var CompressedNft7; } return new TransactionBuilder6.Mint( instructions, - [signer.toKeypair()], + [owner.toKeypair()], payer.toKeypair(), new CompressedNft6.Space(treeOwner) ); @@ -2513,10 +2514,10 @@ var SplToken; // ../suite-spl-token/src/add.ts var SplToken2; ((SplToken11) => { - SplToken11.add = async (token, owner, signers, totalAmount, mintDecimal, options = {}) => { + SplToken11.add = async (token, owner, ownerOrMultisig, totalAmount, mintDecimal, options = {}) => { return Try(async () => { - const payer = options.feePayer ? options.feePayer : signers[0]; - const keypairs = signers.map((s) => s.toKeypair()); + const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); const tokenAssociated = await Account4.Associated.retryGetOrCreate( token, owner, @@ -2544,14 +2545,14 @@ var SplToken2; var import_spl_token3 = require("@solana/spl-token"); var SplToken3; ((SplToken11) => { - SplToken11.burn = (mint, owner, signers, burnAmount, tokenDecimals, options = {}) => { + SplToken11.burn = (mint, owner, ownerOrMultisig, burnAmount, tokenDecimals, options = {}) => { return Try(() => { const tokenAccount = (0, import_spl_token3.getAssociatedTokenAddressSync)( mint.toPublicKey(), owner.toPublicKey() ); - const payer = options.feePayer ? options.feePayer : signers[0]; - const keypairs = signers.map((s) => s.toKeypair()); + const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); const inst = (0, import_spl_token3.createBurnCheckedInstruction)( tokenAccount, mint.toPublicKey(), @@ -2738,12 +2739,12 @@ var import_spl_token6 = require("@solana/spl-token"); var import_web313 = require("@solana/web3.js"); var SplToken6; ((SplToken11) => { - SplToken11.gasLessTransfer = async (mint, owner, dest, signers, amount, mintDecimal, feePayer) => { + SplToken11.gasLessTransfer = async (mint, owner, dest, amount, mintDecimal, feePayer) => { return Try(async () => { - const keypairs = signers.map((s) => s.toKeypair()); + const ownerPublicKey = owner.toKeypair().publicKey; const sourceToken = await Account4.Associated.makeOrCreateInstruction( mint, - owner, + ownerPublicKey.toString(), feePayer ); const destToken = await Account4.Associated.makeOrCreateInstruction( @@ -2763,10 +2764,10 @@ var SplToken6; sourceToken.tokenAccount.toPublicKey(), mint.toPublicKey(), destToken.tokenAccount.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, SplToken.calculateAmount(amount, mintDecimal), mintDecimal, - keypairs + [owner.toKeypair()] ); tx.add(inst2); } else { @@ -2774,17 +2775,15 @@ var SplToken6; sourceToken.tokenAccount.toPublicKey(), mint.toPublicKey(), destToken.tokenAccount.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, SplToken.calculateAmount(amount, mintDecimal), mintDecimal, - keypairs + [owner.toKeypair()] ); tx.add(destToken.inst).add(inst2); } tx.recentBlockhash = blockhashObj.blockhash; - keypairs.forEach((signer) => { - tx.partialSign(signer); - }); + tx.partialSign(owner.toKeypair()); const serializedTx = tx.serialize({ requireAllSignatures: false }); @@ -2870,7 +2869,7 @@ var SplToken7; ); return instructions; }; - SplToken11.mint = async (owner, signer, totalAmount, mintDecimal, input, options = {}) => { + SplToken11.mint = async (owner, totalAmount, mintDecimal, input, options = {}) => { return Try(async () => { const valid = Validator.checkAll(input); if (valid.isErr) { @@ -2878,9 +2877,10 @@ var SplToken7; } const { feePayer, freezeAuthority } = options; const storageType = input.storageType || DEFAULT_STORAGE_TYPE; - const payer = feePayer ? feePayer : signer; + const payer = feePayer ? feePayer : owner; input.royalty = 0; const sellerFeeBasisPoints = 0; + const ownerPublicKey = owner.toKeypair().publicKey; const storageMetadata = Storage.toConvertOffchaindata( input, input.royalty @@ -2923,7 +2923,7 @@ var SplToken7; const mint2 = Account4.Keypair.create(); const insts = await (0, SplToken11.createMint)( mint2.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, totalAmount, mintDecimal, datav2, @@ -2934,14 +2934,14 @@ var SplToken7; insts.push( (0, SplToken11.createFreezeAuthority)( mint2.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, freezeAuthority.toPublicKey() ) ); } return new TransactionBuilder6.Mint( insts, - [signer.toKeypair(), mint2.toKeypair()], + [owner.toKeypair(), mint2.toKeypair()], payer.toKeypair(), mint2.pubkey ); @@ -2978,10 +2978,10 @@ var SplToken8; var import_spl_token9 = require("@solana/spl-token"); var SplToken9; ((SplToken11) => { - SplToken11.transfer = async (mint, owner, dest, signers, amount, mintDecimal, options = {}) => { + SplToken11.transfer = async (mint, owner, dest, ownerOrMultisig, amount, mintDecimal, options = {}) => { return Try(async () => { - const payer = options.feePayer ? options.feePayer : signers[0]; - const keypairs = signers.map((s) => s.toKeypair()); + const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); const sourceToken = await Account4.Associated.retryGetOrCreate( mint, owner, @@ -3023,11 +3023,18 @@ var RegularNft; ((RegularNft11) => { const NFT_AMOUNT = 1; const NFT_DECIMALS = 0; - RegularNft11.burn = (mint, owner, signer, options = {}) => { - const feePayer = options.feePayer ? options.feePayer : signer; - return SplToken10.burn(mint, owner, [signer], NFT_AMOUNT, NFT_DECIMALS, { - feePayer - }); + RegularNft11.burn = (mint, owner, ownerOrMultisig, options = {}) => { + const feePayer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + return SplToken10.burn( + mint, + owner, + ownerOrMultisig, + NFT_AMOUNT, + NFT_DECIMALS, + { + feePayer + } + ); }; })(RegularNft || (RegularNft = {})); @@ -3178,15 +3185,16 @@ var RegularNft4; ); return instructions; }; - RegularNft11.mint = async (owner, signer, input, options = {}) => { + RegularNft11.mint = async (owner, input, options = {}) => { return Try(async () => { const valid = Validator.checkAll(input); if (valid.isErr) { throw valid.error; } const { feePayer, freezeAuthority } = options; - const payer = feePayer ? feePayer : signer; + const payer = feePayer ? feePayer : owner; const storageType = input.storageType || DEFAULT_STORAGE_TYPE; + const ownerPublicKey = owner.toKeypair().publicKey; let properties; if (input.properties) { properties = await Converter14.Properties.intoInfra( @@ -3246,7 +3254,7 @@ var RegularNft4; const mint2 = Account4.Keypair.create(); const instructions = await (0, RegularNft11.createMint)( mint2.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, datav2, payer.toKeypair().publicKey, isMutable @@ -3255,7 +3263,7 @@ var RegularNft4; instructions.push( (0, RegularNft11.createDeleagate)( mint2.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, freezeAuthority.toPublicKey() ) ); @@ -3269,7 +3277,7 @@ var RegularNft4; ) ); } - const keypairs = [signer.toKeypair(), mint2.toKeypair()]; + const keypairs = [owner.toKeypair(), mint2.toKeypair()]; if (input.creators) { input.creators.forEach((creator) => { if (Account4.Keypair.isSecret(creator.secret)) { @@ -3295,14 +3303,16 @@ var import_web316 = require("@solana/web3.js"); var RegularNft5; ((RegularNft11) => { const DEFAULT_STORAGE_TYPE = "nftStorage"; - RegularNft11.gasLessMint = async (owner, signer, input, feePayer, options = {}) => { + RegularNft11.gasLessMint = async (owner, input, feePayer, options = {}) => { return Try(async () => { const valid = Validator.checkAll(input); if (valid.isErr) { throw valid.error; } const storageType = input.storageType || DEFAULT_STORAGE_TYPE; - const sellerFeeBasisPoints = Converter14.Royalty.intoInfra(input.royalty); + const royalty = input.royalty ? input.royalty : 0; + const sellerFeeBasisPoints = Converter14.Royalty.intoInfra(royalty); + const ownerPublickey = owner.toKeypair().publicKey; let uri = ""; if (input.filePath) { const properties = await Converter14.Properties.intoInfra( @@ -3347,7 +3357,7 @@ var RegularNft5; const mint = Account4.Keypair.create(); const insts = await RegularNft4.createMint( mint.toPublicKey(), - owner.toPublicKey(), + ownerPublickey, datav2, feePayer.toPublicKey(), isMutable @@ -3356,7 +3366,7 @@ var RegularNft5; insts.push( RegularNft4.createDeleagate( mint.toPublicKey(), - owner.toPublicKey(), + ownerPublickey, options.freezeAuthority.toPublicKey() ) ); @@ -3369,7 +3379,7 @@ var RegularNft5; }); insts.forEach((inst) => tx.add(inst)); tx.recentBlockhash = blockhashObj.blockhash; - [signer, mint].forEach((signer2) => tx.partialSign(signer2.toKeypair())); + [owner, mint].forEach((signer) => tx.partialSign(signer.toKeypair())); const serializedTx = tx.serialize({ requireAllSignatures: false }); @@ -3384,12 +3394,11 @@ var RegularNft6; ((RegularNft11) => { const NFT_AMOUNT = 1; const NFT_DECIMALS = 0; - RegularNft11.gasLessTransfer = async (mint, owner, dest, signers, feePayer) => { + RegularNft11.gasLessTransfer = async (mint, owner, dest, feePayer) => { return SplToken10.gasLessTransfer( mint, owner, dest, - signers, NFT_AMOUNT, NFT_DECIMALS, feePayer @@ -3403,15 +3412,16 @@ var RegularNft7; ((RegularNft11) => { RegularNft11.DEFAULT_COLLECTION_SIZE = 0; const DEFAULT_STORAGE_TYPE = "nftStorage"; - RegularNft11.mintCollection = (owner, signer, input, options = {}) => { + RegularNft11.mintCollection = (owner, input, options = {}) => { return Try(async () => { const valid = Validator.checkAll(input); if (valid.isErr) { throw valid.error; } const { freezeAuthority, feePayer, collectionSize } = options; - const payer = feePayer ? feePayer : signer; + const payer = feePayer ? feePayer : owner; const storageType = input.storageType || DEFAULT_STORAGE_TYPE; + const ownerPublicKey = owner.toKeypair().publicKey; let properties; if (input.properties) { properties = await Converter14.Properties.intoInfra( @@ -3464,7 +3474,7 @@ var RegularNft7; ); const instructions = await RegularNft4.createMint( collectionMint.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, datav2, payer.toKeypair().publicKey, isMutable @@ -3473,14 +3483,14 @@ var RegularNft7; instructions.push( RegularNft4.createDeleagate( collectionMint.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, freezeAuthority.toPublicKey() ) ); } const collections = { collectionMetadata: collectionMetadataAccount, - collectionAuthority: signer.toKeypair().publicKey, + collectionAuthority: owner.toKeypair().publicKey, collectionMint: collectionMint.toKeypair().publicKey }; instructions.push( @@ -3492,7 +3502,7 @@ var RegularNft7; ); return new TransactionBuilder6.Mint( instructions, - [signer.toKeypair(), collectionMint.toKeypair()], + [owner.toKeypair(), collectionMint.toKeypair()], payer.toKeypair(), collectionMint.pubkey ); @@ -3535,12 +3545,12 @@ var RegularNft9; ((RegularNft11) => { const NFT_AMOUNT = 1; const NFT_DECIMALS = 0; - RegularNft11.transfer = (mint, owner, dest, signers, options = {}) => { + RegularNft11.transfer = (mint, owner, dest, ownerOrMultisig, options = {}) => { return SplToken10.transfer( mint, owner, dest, - signers, + ownerOrMultisig, NFT_AMOUNT, NFT_DECIMALS, options @@ -3564,9 +3574,9 @@ var RegularNft10 = { // src/mint-collection.ts var CompressedNft8; ((CompressedNft10) => { - CompressedNft10.mintCollection = (owner, signer, input, options = {}) => { + CompressedNft10.mintCollection = (owner, input, options = {}) => { const { feePayer, freezeAuthority } = options; - return RegularNft10.mintCollection(owner, signer, input, { + return RegularNft10.mintCollection(owner, input, { feePayer, freezeAuthority }); @@ -3607,4 +3617,4 @@ var CompressedNft9 = { sleep, unixTimestamp }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvY29uc3RhbnRzLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2JhdGNoLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbW1vbi50cyIsICIuLi8uLi9zaGFyZWQvc3JjL3NoYXJlZC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9taW50LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3BhcnRpYWwtc2lnbi50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jYWxjdWxhdGUtdHhzaXplLnRzIiwgIi4uLy4uL3R5cGVzL3NyYy9nbG9iYWwvaW5kZXgudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9hc3NvY2lhdGVkLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvcmVzdWx0LnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvY29sbGVjdGlvbi50cyIsICIuLi8uL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YXN5bmMgKCkgPT4ge1xuICAgICAgICBsZXQgaSA9IDA7XG4gICAgICAgIGZvciAoY29uc3QgYSBvZiBhcnIpIHtcbiAgICAgICAgICBpZiAoIWEuaW5zdHJ1Y3Rpb25zICYmICFhLnNpZ25lcnMpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKFxuICAgICAgICAgICAgICBgb25seSBJbnN0cnVjdGlvbiBvYmplY3QgdGhhdCBjYW4gdXNlIGJhdGNoU3VibWl0KCkuXG4gICAgICAgICAgICBJbmRleDogJHtpfSwgU2V0IHZhbHVlOiAke0pTT04uc3RyaW5naWZ5KGEpfWAsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpKys7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5pbnN0cnVjdGlvbnMpO1xuICAgICAgICBjb25zdCBzaWduZXJzID0gYXJyLmZsYXRNYXAoKGEpID0+IGEuc2lnbmVycyk7XG4gICAgICAgIGNvbnN0IGZlZVBheWVycyA9IGFyci5maWx0ZXIoKGEpID0+IGEuZmVlUGF5ZXIgIT09IHVuZGVmaW5lZCk7XG4gICAgICAgIGxldCBmZWVQYXllciA9IHNpZ25lcnNbMF07XG4gICAgICAgIGlmIChmZWVQYXllcnMubGVuZ3RoID4gMCAmJiBmZWVQYXllcnNbMF0uZmVlUGF5ZXIpIHtcbiAgICAgICAgICBmZWVQYXllciA9IGZlZVBheWVyc1swXS5mZWVQYXllcjtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHRyYW5zYWN0aW9uID0gbmV3IFRyYW5zYWN0aW9uKCk7XG4gICAgICAgIGxldCBmaW5hbFNpZ25lcnMgPSBzaWduZXJzO1xuICAgICAgICBpZiAoZmVlUGF5ZXIpIHtcbiAgICAgICAgICB0cmFuc2FjdGlvbi5mZWVQYXllciA9IGZlZVBheWVyLnB1YmxpY0tleTtcbiAgICAg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JiB0eXBlb2YgaW5zdCA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGluc3QpO1xuICAgICAgICAgICAgcmV0dXJuIGluc3Q7XG4gICAgICAgICAgfSBlbHNlIGlmIChpbnN0IGluc3RhbmNlb2YgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbikge1xuICAgICAgICAgICAgKGF3YWl0IGluc3Quc3VibWl0KCkpLm1hcChcbiAgICAgICAgICAgICAgYXN5bmMgKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZWF0ZSB0b2tlbiBhY2NvdW50OiBgLCBlKTtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyBtaW50OiAke21pbnR9LCBvd25lcjogJHtvd25lcn0sIGZlZVBheWVyOiAke2ZlZVBheWVyfWApO1xuICAgICAgICB9XG4gICAgICAgIGF3YWl0IHNsZWVwKFJFVFJZX1NMRUVQX1RJTUUpO1xuICAgICAgICBjb3VudGVyKys7XG4gICAgICB9XG4gICAgICB0aHJvdyBFcnJvcihgcmV0cnkgYWN0aW9uIGlzIG92ZXIgbGltaXQgJHtSRVRSWV9PVkVS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9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgVE9LRU5fUFJPR1J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ICAgICAgICAgIChtKSA9PiBtLmFjY291bnQgPT09IG91dHB1dC5wYXJzZWQuaW5mby5zb3VyY2UsXG4gICAgICAgICk7XG4gICAgICAgIGNvbnN0IGZvdW5kRGVzdCA9IG1hcHBpbmdUb2tlbkFjY291bnQuZmluZChcbiAgICAgICAgICAobSkgPT4gbS5hY2NvdW50ID09PSBvdXRwdXQucGFyc2VkLmluZm8uZGVzdGluYXRpb24sXG4gICAgICAgICk7XG4gICAgICAgIGZvdW5kU291cmNlICYmIChoaXN0b3J5LnNvdXJjZSA9IGZvdW5kU291cmNlLm93bmVyKTtcbiAgICAgICAgZm91bmREZXN0ICYmIChoaXN0b3J5LmRlc3RpbmF0aW9uID0gZm91bmREZXN0Lm93bmVyKTtcbiAgICAgIH1cblxuICAgICAgaGlzdG9yeS50b2tlbkFtb3VudCA9IG91dHB1dC5wYXJzZWQuaW5mby50b2tlbkFtb3VudDtcbiAgICAgIGhpc3RvcnkubWludCA9IG91dHB1dC5wYXJzZWQuaW5mby5taW50O1xuICAgICAgaGlzdG9yeS5tdWx0aXNpZ0F1dGhvcml0eSA9IG91dHB1dC5wYXJzZWQuaW5mby5tdWx0aXNpZ0F1dGhvcml0eTtcbiAgICAgIGhpc3Rvcnkuc2lnbmVycyA9IG91dHB1dC5wYXJzZWQuaW5mby5zaWduZXJzO1xuICAgICAgaGlzdG9yeS50eXBlID0gb3V0cHV0LnByb2dyYW07XG4gICAgICBoaXN0b3J5LmRhdGVUaW1lID0gY29udmVydFRpbWVzdGFtcFRvRGF0ZVRpbWUobWV0YS5ibG9ja1RpbWUgYXMgbnVtYmVyKTtcbiAgICAgIGhpc3Rvcnkuc2lnID0gbWV0YS50cmFuc2FjdGlvbi5zaWduYXR1cmVzWzBdO1xuICAgICAgaGlzdG9yeS5pbm5lckluc3RydWN0aW9uID0gZmFsc2U7XG5cbiAgICAgIC8vIGlubmVyIGluc3RydWN0aW9uc1xuICAgICAgaWYgKFxuICAgICAgICBtZXRhLm1ldGE/Lmlub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ICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgY29uc3QgbWVzc2F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AgICAgY29uc3QgYXNzZXRzID0gYXdhaXQgRGFzQXBpLmdldEFzc2V0c0J5T3duZXIoXG4gICAgICAgIG93bmVyLFxuICAgICAgICBsaW1pdCxcbiAgICAgICAgcGFnZSxcbiAgICAgICAgc29ydEJ5LFxuICAgICAgICBiZWZvcmUsXG4gICAgICAgIGFmdGVyLFxuICAgICAgKTtcbiAgICAgIGlmIChhc3NldHMuaXNFcnIpIHtcbiAgICAgICAgdGhyb3cgYXNzZXRzLmVycm9yO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBpdGVtcyA9IGFzc2V0cy52YWx1ZS5pdGVtcztcblxuICAgICAgY29uc3QgbWV0YWRhdGFzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGl0ZW1zXG4gICAgICAgICAgLmZpbHRlcigoaXRlbSkgPT4gaXRlbS5jb21wcmVzc2lvbi5jb21wcmVzc2VkID09PSB0cnVlKVxuICAgICAgICAgIC5tYXAoYXN5bmMgKGl0ZW0pID0+IHtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgIGNvbnN0IG9mZmNoYWluOiBPZmZjaGFpbiA9IGF3YWl0IGZldGNoT2ZmY2hhaW4oXG4gICAgICAgICAgICAgICAgaXRlbS5jb250ZW50Lmpzb25fdXJpLFxuICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICBjb25zdCBtZXJnZWQgPSB7XG4gICAgICAgICAgICAgICAgb25jaGFpbjogaXRlbSxcbiAgICAgICAgICAgICAgICBvZmZjaGFpbjogb2ZmY2hhaW4sXG4gICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgIHJldHVybiBDb252ZXJ0ZXIuQ29tcHJlc3NlZE5mdE1ldGFkYXRhLmludG9Vc2VyKG1lcmdlZCk7XG4gICAgICAgICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgICAgICAgZGVidWdMb2coJyMgRmFpbGVkIGZldGNoIG9mZmNoYWluIHVybDogJywgaXRlbS5jb250ZW50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gYXNzZXRzID0gYXdhaXQgRGFzQXBpLmdldEFzc2V0c0J5R3JvdXAoXG4gICAgICAgICdjb2xsZWN0aW9uJyxcbiAgICAgICAgY29sbGVjdGlvbk1pbnQsXG4gICAgICAgIGxpbWl0LFxuICAgICAgICBwYWdlLFxuICAgICAgICBzb3J0QnksXG4gICAgICAgIGJlZm9yZSxcbiAgICAgICAgYWZ0ZXIsXG4gICAgICApO1xuICAgICAgaWYgKGFzc2V0cy5pc0Vycikge1xuICAgICAgICB0aHJvdyBhc3NldHMuZXJyb3I7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGl0ZW1zID0gYXNzZXRzLnZhbHVlLml0ZW1zO1xuXG4gICAgICBjb25zdCBtZXRhZGF0YXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgICAgaXRlbXNcbiAgICAgICAgICAuZmlsdGVyKChpdGVtKSA9PiBpdGVtLmNvbXByZXNzaW9uLmNvbXByZXNzZWQgPT09IHRydWUpXG4gICAgICAgICAgLm1hcChhc3luYyAoaXRlbSkgPT4ge1xuICAgICAgICAgICAgY29uc3Qgb2ZmY2hhaW46IE9mZmNoYWluID0gYXdhaXQgZmV0Y2hPZmZjaGFpbihcbiAgICAgICAgICAgICAgaXRlbS5jb250ZW50Lmpzb25fdXJpLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGNvbnN0IG1lcmdlZCA9IHtcbiAgICAgICAgICAgICAgb25jaGFpbjogaXRlbSxcbiAgICAgICAgICAgICAgb2ZmY2hhaW46IG9mZmNoYWluLFxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHJldHVybiBDb252ZXJ0ZXIuQ29tcHJlc3NlZE5mdE1ldGFkYXRhLmludG9Vc2VyKG1lcmdlZCk7XG4gICAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHtcbiAgICAgICAgcGFnZTogYXNzZXRzLnZhbHVlLnBhZ2UsXG4gICAgICAgIHRvdGFsOiBhc3NldHMudmFsdW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SxcbiAgICAgICAgICBzcGFjZTogc3BhY2UsXG4gICAgICAgICAgcHJvZ3JhbUlkOiBTUExfQUNDT1VOVF9DT01QUkVTU0lPTl9QUk9HUkFNX0lELFxuICAgICAgICB9KSxcbiAgICAgICk7XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVDcmVhdGVUcmVlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAge1xuICAgICAgICAgICAgbWVya2xlVHJlZTogdHJlZU93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICAgIHRyZWVBdXRob3JpdHksXG4gICAgICAgICAgICB0cmVlQ3JlYXRvcjogb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIHBheWVyOiBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgICBsb2dXcmFwcGVyOiBTUExfTk9PUF9QUk9HUkFNX0lELFxuICAgICAgICAgICAgY29tcHJlc3Npb25Qcm9ncmFtOiBTUExfQUNDT1VOVF9DT01QUkVTU0lPTl9QUk9HUkFNX0lELFxuICAgICAgICAgIH0sXG4gICAgICAgICAge1xuICAgICAgICAgICAgbWF4QnVmZmVyU2l6ZSxcbiAgICAgICAgICAgIG1heERlcHRoLFxuICAgICAgICAgICAgcHVibGljOiBmYWxzZSxcbiAgICAgICAgICB9LFxuICAgICAgICAgIE1QTF9CVUJCTEVHVU1fUFJPR1JBTV9JRC50b1B1YmxpY0tleSgpLFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICBbdHJlZU93bmVyLnRvS2V5cGFpcigpLCBzaWduZXIudG9LZXlwYWlyKCldLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgdHJlZU93bmVyLnB1YmtleSxcbiAgICAgICk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yBpbnB1dDogJywgaW5wdXQpO1xuICAgICAgZGVidWdMb2coJyMgbWV0YWRhdGFBcmdzOiAnLCBtZXRhZGF0YUFyZ3MpO1xuXG4gICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBbXTtcbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVNaW50VG9Db2xsZWN0aW9uVjFJbnN0cnVjdGlvbihcbiAgICAgICAgICB7XG4gICAgICAgICAgICBtZXJrbGVUcmVlOiB0cmVlT3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIHRyZWVBdXRob3JpdHksXG4gICAgICAgICAgICB0cmVlRGVsZWdhdGU6IG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBwYXllcjogcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICAgbGVhZk93bmVyOiBsZWFmT3duZXIudG9QdWJsaWNLZXkoKSwgLy8gcmVjZWl2ZXJcbiAgICAgICAgICAgIGxlYWZEZWxlZ2F0ZTogbGVhZkRlbGVnYXRlLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBjb2xsZWN0aW9uQXV0aG9yaXR5OiBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgY29sbGVjdGlvbk1pbnQ6IGNvbGxlY3Rpb25NaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBjb2xsZWN0aW9uTWV0YWRhdGEsXG4gICAgICAgICAgICBlZGl0aW9uQWNjb3VudDogY29sbGVjdGlvbk1hc3RlckVkaXRpb25BY2NvdW50LFxuICAgICAgICAgICAgYnViYmxlZ3VtU2lnbmVyLFxuICAgICAgICAgICAgbG9nV3JhcHBlcjogU1BMX05PT1BfUFJPR1JBTV9JRCxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25BdXRob3JpdHlSZWNvcmRQZGE6IEJVQkJMRUdVTV9QUk9HUkFNX0lELFxuICAgICAgICAgICAgY29tcHJlc3Npb25Qcm9ncmFtOiBTUExfQUNDT1VOVF9DT01QUkVTU0lPTl9QUk9HUkFNX0lELFxuICAgICAgICAgICAgdG9rZW5NZXRhZGF0YVByb2dyYW06IFRPS0VOX01FVEFEQVRBX1BST0dSQU1fSUQsXG4gICAgICAgICAgfSxcbiAgICAgICAgICB7XG4gICAgICAgICAgICBtZXRhZGF0YUFyZ3MsXG4gICAgICAgICAgfSxcbiAgICAgICAgKSxcbiAgICAgICk7XG5cbiAgICAgIGlmIChpbnB1dC5jcmVhdG9ycykge1xuICAgICAgICBjb25zdCBhc3NldElkID0gYXdhaXQgbmV3IFNwYWNlLlNwYWNlKHRyZWVPd25lcikuZ2V0QXNzZXRJZCgpO1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBhd2FpdCBjcmVhdGVWZXJpZnlDcmVhdG9yKFxuICAgICAgICAgICAgbWV0YWRhdGFBcmdzLmNyZWF0b3JzLFxuICAgICAgICAgICAgYXNzZXRJZC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgdHJlZU93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBtZXRhZGF0YUFyZ3MsXG4gICAgICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICBbc2lnbmVyLnRvS2V5cGFpcigpXSxcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIG5ldyBTcGFjZS5TcGFjZSh0cmVlT3duZXIpLFxuICAgICAgKTtcbiAgICB9KTtcbiAgfTtcbn1cbiIsICJpbXBvcnQgeyBjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24gfSBmcm9tICdAc29sYW5hL3NwbC10b2tlbic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1ldGFkYXRhOiAnLFxuICAgICAgICAgICAgZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8sXG4gICAgICAgICAgKTtcbiAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBtaW50ID0gZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8ubWludCBhcyBQdWJrZXk7XG4gICAgICAgIGNvbnN0IHRva2VuQW1vdW50ID0gZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8udG9rZW5BbW91bnRcbiAgICAgICAgICAuYW1vdW50IGFzIHN0cmluZztcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IG1ldGFkYXRhID0gYXdhaXQgTWV0YWRhdGEuZnJvbUFjY291bnRBZGRyZXNzKFxuICAgICAgICAgICAgY29ubmVjdGlvbixcbiAgICAgICAgICAgIEFjY291bnQuUGRhLmdldE1ldGFkYXRhKG1pbnQpLFxuICAgICAgICAgICk7XG4gICAgICAgICAgZGVidWdMb2coJyMgZmluZEJ5T3duZXIgbWV0YWRhdGE6ICcsIG1ldGFkYXRhKTtcbiAgICAgICAgICAvLyB0b2tlblN0YW5kYXJkOiAwKE5GVCkgb3IgMiAoU1BMLVRPS0VOKVxuICAgICAgICAgIGlmIChtZXRhZGF0YS50b2tlblN0YW5kYXJkICE9PSB0b2tlblN0YW5kYXJkKSB7XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICB9XG4gICAgICAgICAgZmV0Y2gobWV0YWRhdGEuZGF0YS51cmkpXG4gICAgICAgICAgICAudGhlbigocmVzcG9uc2UpID0+IHtcbiAgICAgICAgICAgICAgcmVzcG9uc2VcbiAgICAgICAgICAgICAgICAuanNvbigpXG4gICAgICAgICAgICAgICAgLnRoZW4oKGpzb246IE9mZmNoYWluKSA9PiB7XG4gICAgICAgICAgICAgICAgICBkYXRhLnB1c2goXG4gICAgICAgICAgICAgICAgICAgIGNvbnZlcnRlcjxUPih0b2tlblN0YW5kYXJkLCBtZXRhZGF0YSwganNvbiwgdG9rZW5BbW91bnQpLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgIGNhbGxiYWNrKFJlc3VsdC5vayhkYXRhKSk7IC8vIG5lZWQgdGhpcyBjYWxsID9cbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIC5jYXRjaCgoZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgY2FsbGJhY2soUmVzdWx0LmVycihlKSk7XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAuZmluYWxseSgoKSA9PiB7XG4gICAgICAgICAgICAgICAgICBjb25zdCBkZXNjQWxnbyA9IHNvcnRCeVVpbml4VGltZXN0YW1wPFQ+KFNvcnREaXJlY3Rpb24uRGVzYyk7XG4gICAgICAgICAgICAgICAgICBjb25zdCBhc2NBbGdvID0gc29ydEJ5VWluaXhUaW1lc3RhbXA8VD4oU29ydERpcmVjdGlvbi5Bc2MpO1xuICAgICAgICAgICAgICAgICAgaWYgKHNvcnRhYmxlID09PSBTb3J0RGlyZWN0aW9uLkRlc2MpIHtcbiAgICAgICAgICAgICAgICAgICAgZGF0YSA9IGRhdGEuc29ydChkZXNjQWxnbyk7XG4gICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHNvcnRhYmxlID09PSBTb3J0RGlyZWN0aW9uLkFzYykge1xuICAgICAgICAgICAgICAgICAgICBkYXRhID0gZGF0YS5zb3J0KGFzY0FsZ28pO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgY2FsbGJhY2soUmVzdWx0Lm9rKGRhdGEpKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAuY2F0Y2goKGUpID0+IHtcbiAgICAgICAgICAgICAgY2FsbGJhY2soUmVzdWx0LmVycihlKSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIG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9KSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVJbml0aWFsaXplTWludEluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgIGZlZVBheWVyLFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBtaW50LFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIENhbGN1bGF0ZS5jYWxjdWxhdGVBbW91bnQodG90YWxBbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1ldGFkYXRhQWNjb3VudFYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBtZXRhZGF0YTogbWV0YWRhdGFQZGEsXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGN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ICAgICAgICBpbnB1dC5maWxlUGF0aCxcbiAgICAgICAgICBzdG9yYWdlVHlwZSxcbiAgICAgICAgICBwYXllcixcbiAgICAgICAgKTtcblxuICAgICAgICBpZiAodXBsb2FkZWQuaXNFcnIpIHtcbiAgICAgICAgICB0aHJvdyB1cGxvYWRlZDtcbiAgICAgICAgfVxuICAgICAgICB1cmkgPSB1cGxvYWRlZC52YWx1ZTtcbiAgICAgIH0gZWxzZSBpZiAoaW5wdXQudXJpKSB7XG4gICAgICAgIGNvbnN0IGltYWdlID0geyBpbWFnZTogaW5wdXQudXJpIH07XG4gICAgICAgIGNvbnN0IHVwbG9hZGVkID0gYXdhaXQgU3RvcmFnZS51cGxvYWREYXRhKFxuICAgICAgICAgIHsgLi4uc3RvcmFnZU1ldGFkYXRhLCAuLi5pbWFnZSB9LFxuICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgIHBheWVyLFxuICAgICAgICApO1xuICAgICAgICBpZiAodXBsb2FkZWQuaXNFcnIpIHtcbiAgICAgICAgICB0aHJvdyB1cGxvYWRlZDtcbiAgICAgICAgfVxuICAgICAgICB1cmkgPSB1cGxvYWRlZC52YWx1ZTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHRocm93IEVycm9yKGBNdXN0IHNldCBmaWxlUGF0aCcgb3IgJ3VyaSdgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gdHJ1ZTtcblxuICAgICAgY29uc3QgZGF0YXYyID0gQ29udmVydGVyLlRva2VuTWV0YWRhdGEuaW50b0luZnJhKFxuICAgICAgICBpbnB1dCxcbiAgICAgICAgdXJpLFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcbiAgICAgIGRlYnVnTG9nKCcjIHVwbG9hZCBjb250ZW50IHVybDogJywgdXJpKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICB0b3RhbEFtb3VudCxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHMucHVzaChcbiAgICAgICAgICBjcmVhdGVGcmVlemVBdXRob3JpdHkoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHMsXG4gICAgICAgIFtzaWduZXIudG9LZXlwYWlyKCksIG1pbnQudG9LZXlwYWlyKCldLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgbWludC5wdWJrZXksXG4gICAgICApO1xuICAgIH0pO1xuICB9O1xufVxuIiwgImltcG9ydCB7IFJlc3VsdCwgVHJ5IH0gZnJvbSAnfi9zaGFyZWQnO1xuaW1wb3J0IHsgVHJhbnNhY3Rpb25CdWlsZGVyIH0gZnJvbSAnfi90cmFuc2FjdGlvbi1idWlsZGVyJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydC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cbiAgICAgICAgICAgIGRhdGE6IG5mdE1ldGFkYXRhLFxuICAgICAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgICAgICAgY29sbGVjdGlvbkRldGFpbHM6IG51bGwsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWFzdGVyRWRpdGlvblYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBlZGl0aW9uOiBtYXN0ZXJFZGl0aW9uUHVia2V5LFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgbWV0YWRhdGE6IHRva2VuTWV0YWRhdGFQdWJrZXksXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNYXN0ZXJFZGl0aW9uQXJnczoge1xuICAgICAgICAgICAgbWF4U3VwcGx5OiAwLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG4gICAgcmV0dXJuIGluc3RydWN0aW9ucztcbiAgfTtcblxuICAvKipcbiAgICogVXBsb2FkIGNvbnRlbnQgYW5kIE5GVCBtaW50XG4gICAqXG4gICAqIEBwYXJhbSB7UHVia2V5fSBvd25lciAgICAgICAgICAvLyBmaXJzdCBtaW50ZWQgb3duZXJcbiAgICogQHBhcmFtIHtTZWNyZXR9IHNpZ25lciAgICAgICAgIC8vIG93bmVyJ3MgU2VjcmV0XG4gICAqIEBwYXJhbSB7SW5wdXROZnRNZXRhZGF0YX0gaW5wdXRcbiAgICoge1xuICAgKiAgIG5hbWU6IHN0cmluZyAgICAgICAgICAgICAgIC8vIG5mdCBjb250ZW50IG5hbWVcbiAgICogICB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V0LmlzTXV0YWJsZTtcblxuICAgICAgZGVidWdMb2coJyMgaW5wdXQ6ICcsIGlucHV0KTtcbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICAvLyBjb2xsZWN0aW9uIC0tLVxuICAgICAgaWYgKGlucHV0LmNvbGxlY3Rpb24pIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlVmVyaWZ5U2l6ZWRDb2xsZWN0aW9uKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgaW5wdXQuY29sbGVjdGlvbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICksXG4gICAgICAgICk7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SBhd2FpdCBNaW50LmNyZWF0ZU1pbnQoXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChvcHRpb25zLmZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cy5wdXNoKFxuICAgICAgICAgIE1pbnQuY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG9wdGlvbnMuZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgYmxvY2toYXNoT2JqID0gYXdhaXQgTm9kZS5nZXRDb25uZWN0aW9uKCkuZ2V0TGF0ZXN0QmxvY2toYXNoKCk7XG4gICAgICBjb25zdCB0eCA9IG5ldyBUcmFuc2FjdGlvbih7XG4gICAgICAgIGxhc3RWYWxpZEJsb2NrSGVpZ2h0OiBibG9ja2hhc2hPYmoubGFzdFZhbGlkQmxvY2tIZWlnaHQsXG4gICAgICAgIGJsb2NraGFzaDogYmxvY2toYXNoT2JqLmJsb2NraGFzaCxcbiAgICAgICAgZmVlUGF5ZXI6IGZlZVBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICB9KTtcblxuICAgICAgaW5zdHMuZm9yRWFjaCgoaW5zdCkgPT4gdHguYWRkKGluc3QpKTtcbiAgICAgIHR4LnJlY2VudEJsb2NraGFzaCA9IGJsb2NraGFzaE9iai5ibG9ja2hhc2g7XG4gICAgICBbc2lnbmVyLCBtaW50XS5mb3JFYWNoKCh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GRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgY29sbGVjdGlvbk1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG4gICAgICBjb25zdCBjb2xsZWN0aW9uTWV0YWRhdGFBY2NvdW50ID0gQWNjb3VudC5QZGEuZ2V0TWV0YWRhdGEoXG4gICAgICAgIGNvbGxlY3Rpb25NaW50LnB1YmtleSxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGF3YWl0IE1pbnQuY3JlYXRlTWludChcbiAgICAgICAgY29sbGVjdGlvbk1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBNaW50LmNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIGNvbGxlY3Rpb25NaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgY29sbGVjdGlvbnMgPSB7XG4gICAgICAgIGNvbGxlY3Rpb25NZXRhZGF0YTogY29sbGVjdGlvbk1ldGFkYXRhQWNjb3VudCxcbiAgICAgICAgY29sbGVjdGlvbkF1dGhvcml0eTogc2lnbmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgY29sbGVjdGlvbk1pbn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gICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZWF0ZSB0b2tlbiBhY2NvdW50OiBgLCBlKTtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyBtaW50OiAke21pbnR9LCBvd25lcjogJHtvd25lcn0sIGZlZVBheWVyOiAke2ZlZVBheWVyfWApO1xuICAgICAgICB9XG4gICAgICAgIGF3YWl0IHNsZWVwKFJFVFJZX1NMRUVQX1RJTUUpO1xuICAgICAgICBjb3VudGVyKys7XG4gICAgICB9XG4gICAgICB0aHJvdyBFcnJvcihgcmV0cnkgYWN0aW9uIGlzIG92ZXIgbGltaXQgJHtSRVRSWV9PVkVSX0xJTUlUfWApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBbTWFpbiBsb2dpY11HZXQgQXNzb2NpYXRlZCB0b2tlbiBBY2NvdW50LlxuICAgICAqIGlmIG5vdCBjcmVhdGVkLCBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCBtYWtlT3JDcmVhdGVJbnN0cnVjdGlvbiA9IGFzeW5jIChcbiAgICAgIG1pbnQ6IFB1YmtleSxcbiAgICAgIG93bmVyOiBQdWJrZXksXG4gICAgICBmZWVQYXllcj86IFB1YmtleSxcbiAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSA9IGZhbHNlLFxuICAgICk6IFByb21pc2U8e1xuICAgICAgdG9rZW5BY2NvdW50OiBzdHJpbmc7XG4gICAgICBpbnN0OiBUcmFuc2FjdGlvbkluc3RydWN0aW9uIHwgdW5kZWZpbmVkO1xuICAgIH0+ID0+IHtcbiAgICAgIGNvbnN0IGFzc29jaWF0ZWRUb2tlbkFjY291bnQgPSBnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyhcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0LFxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQgeyBLZXlwYWlyIGFzIE9yaWdpbmFsLCBQdWJsaWNLZXkgfSBmcm9tICdAc29sYW5hL3dlYjMuanMnO1xuaW1wb3J0IHsgUHVia2V5LCBTZWNyZXQgfSBmcm9tICd+L3R5cGVzL2FjY291bnQnO1xuaW1wb3J0IGJzIGZyb20gJ2JzNTgnO1xuX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l0ZW0pID0+IGl0ZW0uY29tcHJlc3Npb24uY29tcHJlc3NlZCA9PT0gdHJ1ZSlcbiAgICAgICAgICAubWFwKGFzeW5jIChpdGVtKSA9PiB7XG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICBjb25zdCBvZmZjaGFpbjogT2ZmY2hhaW4gPSBhd2FpdCBmZXRjaE9mZmNoYWluKFxuICAgICAgICAgICAgICAgIGl0ZW0uY29udGVudC5qc29uX3VyaSxcbiAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgY29uc3QgbWVyZ2VkID0ge1xuICAgICAgICAgICAgICAgIG9uY2hhaW46IGl0ZW0sXG4gICAgICAgICAgICAgICAgb2ZmY2hhaW46IG9mZmNoYWluLFxuICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICByZXR1cm4gQ29udmVydGVyLkNvbXByZXNzZWROZnRNZXRhZGF0YS5pbnRvVXNlcihtZXJnZWQpO1xuICAgICAgICAgICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEZhaWxlZCBmZXRjaCBvZmZjaGFpbiB1cmw6ICcsIGl0ZW0uY29udGVudC5qc29uX3VyaSk7XG4gICAgICAgICAgICAgIHJldHVybiBDb252ZXJ0ZXIuQ29tcHJlc3NlZE5mdE1ldGFkYXRhLmludG9Vc2VyKHtcbiAgICAgICAgICAgICAgICBvbmNoYWluOiBpdGVtLFxuICAgICAgICAgICAgICAgIG9mZmNoYWluOiB7fSxcbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHtcbiAgICAgICAgcGFnZTogYXNzZXRzLnZhbHVlLnBhZ2UsXG4gICAgICAgIHRvdGFsOiBhc3NldHMudmFsdWUudG90YWwsXG4gICAgICAgIGxpbWl0OiBhc3NldHMudmFsdWUubGltaXQsXG4gICAgICAgIG1ldGFkYXRhcyxcbiAgICAgIH07XG4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G4gICAgICAgICAgICBjb2xsZWN0aW9uTWV0YWRhdGEsXG4gICAgICAgICAgICBlZGl0aW9uQWNjb3VudDogY29sbGVjdGlvbk1hc3RlckVkaXRpb25BY2NvdW50LFxuICAgICAgICAgICAgYnViYmxlZ3VtU2lnbmVyLFxuICAgICAgICAgICAgbG9nV3JhcHBlcjogU1BMX05PT1BfUFJPR1JBTV9JRCxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25BdXRob3JpdHlSZWNvcmRQZGE6IEJVQkJMRUdVTV9QUk9HUkFNX0lELFxuICAgICAgICAgICAgY29tcHJlc3Npb25Qcm9ncmFtOiBTUExfQUNDT1VOVF9DT01QUkVTU0lPTl9QUk9HUkFNX0lELFxuICAgICAgICAgICAgdG9rZW5NZXRhZGF0YVByb2dyYW06IFRPS0VOX01FVEFEQVRBX1BST0dSQU1fSUQsXG4gICAgICAgICAgfSxcbiAgICAgICAgICB7XG4gICAgICAgICAgICBtZXRhZGF0YUFyZ3MsXG4gICAgICAgICAgfSxcbiAgICAgICAgKSxcbiAgICAgICk7XG5cbiAgICAgIGlmIChpbnB1dC5jcmVhdG9ycykge1xuICAgICAgICBjb25zdCBhc3NldElkID0gYXdhaXQgbmV3IFNwYWNlLlNwYWNlKHRyZWVPd25lcikuZ2V0QXNzZXRJZCgpO1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBhd2FpdCBjcmVhdGVWZXJpZnlDcmVhdG9yKFxuICAgICAgICAgICAgbWV0YWRhdGFBcmdzLmNyZWF0b3JzLFxuICAgICAgICAgICAgYXNzZXRJZC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgdHJlZU93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBtZXRhZGF0YUFyZ3MsXG4gICAgICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ld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wdGlvbnM+ID0ge30sXG4gICk6IFByb21pc2U8UmVzdWx0PENvbW1vblN0cnVjdHVyZTxQdWJrZXk+LCBFcnJvcj4+ID0+IHtcbiAgICByZXR1cm4gVHJ5KGFzeW5jICgpID0+IHtcbiAgICAgIGNvbnN0IHBheWVyID0gb3B0aW9ucy5mZWVQYXllciA/IG9wdGlvbnMuZmVlUGF5ZXIgOiBvd25lck9yTXVsdGlzaWdbMF07XG4gICAgICBjb25zdCBrZXlwYWlycyA9IG93bmVyT3JNdWx0aXNpZy5tYXAoKHMpID0+IHMudG9LZXlwYWlyKCkpO1xuXG4gICAgICBjb25zdCB0b2tlbkFzc29jaWF0ZWQgPSBhd2FpdCBBY2NvdW50LkFzc29jaWF0ZWQucmV0cnlHZXRPckNyZWF0ZShcbiAgICAgICAgdG9rZW4sXG4gICAgICAgIG93bmVyLFxuICAgICAgICBwYXllcixcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBDYWxjdWxhdGUuY2FsY3VsYXRlQW1vdW50KHRvdGFsQW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBrZXlwYWlycyxcbiAgICAgICk7XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbjxQdWJrZXk+KFxuICAgICAgICBbaW5zdF0sXG4gICAgICAgIGtleXBhaXJzLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgdG9rZW4sXG4gICAgICApO1xuICAgIH0pO1xuICB9O1xufVxuIiwgIi8vQGludGVybmFsXG5leHBvcnQgbmFtZXNwYWNl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ICAgICB7XG4gICAgICAgICAgcHJvZ3JhbUlkOiBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICB9LFxuICAgICAgKTtcblxuICAgICAgaW5mby52YWx1ZS5sZW5ndGggPT09IDAgJiYgY2FsbGJhY2soUmVzdWx0Lm9rKFtdKSk7XG5cbiAgICAgIGZvciBhd2FpdCAoY29uc3QgZCBvZiBpbmZvLnZhbHVlKSB7XG4gICAgICAgIGlmIChpc0hvbGRlciAmJiBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby50b2tlbkFtb3VudC51aUFtb3VudCA8IDEpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhcbiAgICAgICAgICAgICcjIGZpbmRCeU93bmVyIG5vIGhvbGQgbWV0YWRhdGE6ICcsXG4gICAgICAgICAgICBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mbyxcbiAgICAgICAgICApO1xuICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IG1pbnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby5taW50IGFzIFB1YmtleTtcbiAgICAgICAgY29uc3QgdG9rZW5BbW91bnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby50b2tlbkFtb3VudFxuICAgICAgICAgIC5hbW91bnQgYXMgc3RyaW5nO1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgY29uc3QgbWV0YWRhdGEgPSBhd2FpdCBNZXRhZGF0YS5mcm9tQWNjb3VudEFkZHJlc3MoXG4gICAgICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICAgICAgQWNjb3VudC5QZGEuZ2V0TWV0YWRhdGEobWludCksXG4gICAgICAgICAgKTtcbiAgICAgICAgICBkZWJ1Z0xvZygnIyBmaW5kQnlPd25lciBtZXRhZGF0YTogJywgbWV0YWRhdGEpO1xuICAgICAgICAgIC8vIHRva2VuU3RhbmRhcmQ6IDAoTkZUKSBvciAyIChTUEwtVE9LRU4pXG4gICAgICAgICAgaWYgKG1ldGFkYXRhLnRva2VuU3RhbmRhcmQgIT09IHRva2VuU3RhbmRhcmQpIHtcbiAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgIH1cbiAgICAgICAgICBmZXRjaChtZXRhZGF0YS5kYXRhLnVyaSlcbiAgICAgICAgICAgIC50aGVuKChyZXNwb25zZSkgPT4ge1xuICAgICAgICAgICAgICByZXNwb25zZVxuICAgICAgICAgICAgICAgIC5qc29uKClcbiAgICAgICAgICAgICAgICAudGhlbigoanNvbjogT2ZmY2hhaW4pID0+IHtcbiAgICAgICAgICAgICAgICAgIGRhdGEucHVzaChcbiAgICAgICAgICAgICAgICAgICAgY29udmVydGVyPFQ+KHRva2VuU3RhbmRhcmQsIG1ldGFkYXRhLCBqc29uLCB0b2tlbkFtb3VudCksXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgY2FsbGJhY2soUmVzdWx0Lm9rKGRhdGEpKTsgLy8gbmVlZCB0aGlzIGNhbGwgP1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgLmNhdGNoKChlKSA9PiB7XG4gICAgICAgICAgICAgICAgICBjYWxsYmFjayhSZXN1bHQuZXJyKGUpKTtcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIC5maW5hbGx5KCgpID0+IHtcbiAgICAgICAgICAgICAgICAgIGNvbnN0IGRlc2NBbGdvID0gc29ydEJ5VWluaXhUaW1lc3RhbXA8VD4oU29ydERpcmVjdGlvbi5EZXNjKTtcbiAgICAgICAgICAgICAgICAgIGNvbnN0IGFzY0FsZ28gPSBzb3J0QnlVaW5peFRpbWVzdGFtcDxUPihTb3J0RGlyZWN0aW9uLkFzYyk7XG4gICAgICAgICAgICAgICAgICBpZiAoc29ydGFibGUgPT09IFNvcnREaXJlY3Rpb24uRGVzYykge1xuICAgICAgICAgICAgICAgICAgICBkYXRhID0gZGF0YS5zb3J0KGRlc2NBbGdvKTtcbiAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoc29ydGFibGUgPT09IFNvcnREaXJlY3Rpb24uQXNjKSB7XG4gICAgICAgICAgICAgICAgICAgIGRhdGEgPSBkYXRhLnNvcnQoYXNjQWxnbyk7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICBjYWxsYmFjayhSZXN1bHQub2soZGF0YSkpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIC5jYXRjaCgoZSkgPT4ge1xuICAgICAgICAgICAgICBjYWxsYmFjayhSZXN1bHQuZXJyKGUpKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgaWYgKGUgaW5zdGFuY2VvZiBFcnJvciAmJiBVTkFCTEVfRVJST1JfUkVHRVgudGVzdChlLm1lc3NhZ2UpKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBza2lwIGVycm9yIGZvciBvbGQgU1BMLVRPS0VOOiAnLCBtaW50KTtcbiAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgIGlmIChlIGluc3RhbmNlb2YgRXJyb3IpIHtcbiAgICAgICAgY2FsbGJhY2soUmVzdWx0LmVycihlKSk7XG4gICAgICB9XG4gICAgfVxuICB9O1xuXG4gIGV4cG9ydCBjb25zdCBnZW5lcmljRmluZEJ5TWludCA9IGFzeW5jIDxcbiAgICBUIGV4dGVuZHMgUmVndWxhck5mdE1ldGFkYXRhIHwgVG9rZW5NZXRhZGF0YSxcbiAgPihcbiAgICBtaW50OiBQdWJrZXksXG4gICAgdG9rZW5TdGFuZGFyZDogVG9rZW5TdGFuZGFyZCxcbiAgKTogUHJvbWlzZTxSZXN1bHQ8VCwgRXJyb3I+PiA9PiB7XG4gICAgdHJ5IHtcbiAgICAgIGNvbn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ja2hhc2hPYmouYmxvY2toYXNoLFxuICAgICAgICBmZWVQYXllcjogZmVlUGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgIH0pO1xuXG4gICAgICAvLyByZXR1cm4gYXNzb2NpYXRlZCB0b2tlbiBhY2NvdW50XG4gICAgICBpZiAoIWRlc3RUb2tlbi5pbnN0KSB7XG4gICAgICAgIGluc3QyID0gY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgc291cmNlVG9rZW4udG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGRlc3RUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICBDYWxjdWxhdG9yLmNhbGN1bGF0ZUFtb3VudChhbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgICBbb3duZXIudG9LZXlwYWlyKCldLFxuICAgICAgICApO1xuICAgICAgICB0eC5hZGQoaW5zdDIpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgLy8gcmV0dXJuIGluc3RydWN0aW9uIGFuZCB1bmRlY2lkZWQgYXNzb2NpYXRlZCB0b2tlbiBhY2NvdW50XG4gICAgICAgIGluc3QyID0gY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgc291cmNlVG9rZW4udG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGRlc3RUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICBDYWxjdWxhdG9yLmNhbGN1bGF0ZUFtb3VudChhbW91bnQsIG1pbnRE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G9rZW5BZGRyZXNzU3luYyhtaW50LCBvd25lcik7XG4gICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gW107XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIFN5c3RlbVByb2dyYW0uY3JlYXRlQWNjb3VudCh7XG4gICAgICAgIGZyb21QdWJrZXk6IGZlZVBheWVyLFxuICAgICAgICBuZXdBY2NvdW50UHVia2V5OiBtaW50LFxuICAgICAgICBzcGFjZTogTUlOVF9TSVpFLFxuICAgICAgICBsYW1wb3J0czogbGFtcG9ydHMsXG4gICAgICAgIHByb2dyYW1JZDogVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgIH0pLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUluaXRpYWxpemVNaW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBvd25lcixcbiAgICAgICAgb3duZXIsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgZmVlUGF5ZXIsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG1pbnQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgQ2FsY3VsYXRlLmNhbGN1bGF0ZUFtb3VudCh0b3RhbEFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWV0YWRhdGFBY2NvdW50VjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIG1ldGFkYXRhOiBtZXRhZGF0YVBkYSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWV0YWRhdGFBY2NvdW50QXJnc1YzOiB7XG4gICAgICAgICAgICBkYXRhOiB0b2tlbk1ldGFkYXRhLFxuICAgICAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgICAgICAgY29sbGVjdGlvbkRldGFpbHM6IG51bGwsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcbiAgICByZXR1cm4gaW5zdHJ1Y3Rpb25zO1xuICB9O1xuXG4gIC8qKlxuICAgKiBTUEwtVE9LRU4gbWludFxuICAgKlxuICAgKiBAcGFyYW0ge1NlY3JldH0gb3duZXIgICAgICAvLyB0b2tlbiBvd25lciBTZWNyZXRcbiAgICogQHBhcmFtIHtudW1iZXJ9IHRvdGFsQW1vdW50IC8vIHRvdGFsIG51bWJlclxuICAgKiBAcGFyYW0ge251bWJlcn0gbWludERlY2ltYWwgLy8gdG9rZW4gZGVjaW1hbFxuICAgKiBAcGFyYW0ge0lucHV0VG9rZW5NZXRhZGF0YX0gaW5wdXQgICAgICAgLy8gdG9rZW4gbWV0YWRhdGFcbiAgICogQHBhcmFtIHtQYXJ0aWFsPE1pbnRPcHRpb25zPn0gb3B0aW9ucyAgIC8vIG9wdGlvbnNcbiAgICogQHJldHVybiBQcm9taXNlPFJlc3VsdDxNaW50SW5zdHJ1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25zLmZlZVBheWVyIDogb3duZXJPck11bHRpc2lnWzBdO1xuICAgICAgY29uc3Qga2V5cGFpcnMgPSBvd25lck9yTXVsdGlzaWcubWFwKChzKSA9PiBzLnRvS2V5cGFpcigpKTtcblxuICAgICAgY29uc3Qgc291cmNlVG9rZW4gPSBhd2FpdCBBY2NvdW50LkFzc29jaWF0ZWQucmV0cnlHZXRPckNyZWF0ZShcbiAgICAgICAgbWludCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIHBheWVyLFxuICAgICAgKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIG1pbnQsXG4gICAgICAgIGRlc3QsXG4gICAgICAgIHBheWVyLFxuICAgICAgKTtcblxuICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZVRyYW5zZmVyQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICBzb3VyY2VUb2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIGRlc3RUb2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBDYWxjdWxhdG9yLmNhbGN1bGF0ZUFtb3VudChhbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIGtleXBhaXJzLFxuICAgICAgKTtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKFtpbnN0XSwga2V5cGFpcnMsIHBheWVyLnRvS2V5cGFpcigpKTtcbiAgICB9KTtcbiAgfTtcbn1cbiIsICJpbXBvcnQgeyBTcGxUb2tlbiBhcyBBZGQgfSBmcm9tICcuL2FkZCc7XG5pbXBvcnQgeyBTcGxUb2tlbiBhcyBCdXJuIH0gZnJvbSAnLi9idXJuJztcbmlt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cjogUHVibGljS2V5LFxuICAgIGlzTXV0YWJsZTogYm9vbGVhbixcbiAgKTogUHJvbWlzZTxUcmFuc2FjdGlvbkluc3RydWN0aW9uW10+ID0+IHtcbiAgICBjb25zdCBhdGEgPSBnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyhtaW50LCBvd25lcik7XG4gICAgY29uc3QgdG9rZW5NZXRhZGF0YVB1YmtleSA9IEFjY291bnQuUGRhLmdldE1ldGFkYXRhKG1pbnQudG9TdHJpbmcoKSk7XG4gICAgY29uc3QgbWFzdGVyRWRpdGlvblB1YmtleSA9IEFjY291bnQuUGRhLmdldE1hc3RlckVkaXRpb24obWludC50b1N0cmluZygpKTtcbiAgICBjb25zdCBjb25uZWN0aW9uID0gTm9kZS5nZXRDb25uZWN0aW9uKCk7XG4gICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gW107XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIFN5c3RlbVByb2dyYW0uY3JlYXRlQWNjb3VudCh7XG4gICAgICAgIGZyb21QdWJrZXk6IGZlZVBheWVyLFxuICAgICAgICBuZXdBY2NvdW50UHVia2V5OiBtaW50LFxuICAgICAgICBsYW1wb3J0czogYXdhaXQgZ2V0TWluaW11bUJhbGFuY2VGb3JSZW50RXhlbXB0TWludChjb25uZWN0aW9uKSxcbiAgICAgICAgc3BhY2U6IE1JTlRfU0laRSxcbiAgICAgICAgcHJvZ3JhbUlkOiBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgfSksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKGNyZWF0ZUluaXRpYWxpemVNaW50SW5zdHJ1Y3Rpb24obWludCwgMCwgb3duZXIsIG93bmVyKSk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihmZWVQYXllciwgYXRhLCBvd25lciwgbWludCksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKGNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbihtaW50LCBhdGEsIG93bmVyLCAxLCAwKSk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1ldGFkYXRhQWNjb3VudFYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBtZXRhZGF0YTogdG9rZW5NZXRhZGF0YVB1YmtleSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWV0YWRhdGFBY2NvdW50QXJnc1YzOiB7XG4gICAgICAgICAgICBkYXRhOiBuZnRNZXRhZGF0YSxcbiAgICAgICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25EZXRhaWxzOiBudWxsLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1hc3RlckVkaXRpb25WM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgZWRpdGlvbjogbWFzdGVyRWRpdGlvblB1YmtleSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIG1ldGFkYXRhOiB0b2tlbk1ldGFkYXRhUHVia2V5LFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTW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NLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgLy8gY29sbGVjdGlvbiAtLS1cbiAgICAgIGlmIChpbnB1dC5jb2xsZWN0aW9uKSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZVZlcmlmeVNpemVkQ29sbGVjdGlvbihcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIGlucHV0LmNvbGxlY3Rpb24udG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBrZXlwYWlycyA9IFtvd25lci50b0tleXBhaXIoKSwgbWludC50b0tleXBhaXIoKV07XG5cbiAgICAgIC8vIGNyZWF0b3IgLS0tXG4gICAgICBpZiAoaW5wdXQuY3JlYXRvcnMpIHtcbiAgICAgICAgaW5wdXQuY3JlYXRvcnMuZm9yRWFjaCgoY3JlYXRvcikgPT4ge1xuICAgICAgICAgIGlmIChBY2NvdW50LktleXBhaXIuaXNTZWNyZXQoY3JlYXRvci5zZWNyZXQpKSB7XG4gICAgICAgICAgICBjb25zdCBjcmVhdG9yUHVia2V5ID0gY3JlYXRvci5hZGRyZXNzLnRvUHVibGljS2V5KCk7XG4gICAgICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlVmVyaWZ5Q3JlYXRvcihtaW50LnRvUHVibGljS2V5KCksIGNyZWF0b3JQdWJrZXkpO1xuICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goaW5zdCk7XG4gICAgICAgICAgICBrZXlwYWlycy5wdXNoKGNyZWF0b3Iuc2VjcmV0LnRv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W5mcmEoaW5wdXQuY29sbGVjdGlvbik7XG4gICAgICAgIGRhdGF2MiA9IHsgLi4uZGF0YXYyLCBjb2xsZWN0aW9uIH07XG4gICAgICB9XG4gICAgICAvLy0tLSBjb2xsZWN0aW9uIC0tLVxuXG4gICAgICBjb25zdCBpc011dGFibGUgPSBpbnB1dC5pc011dGFibGUgPT09IHVuZGVmaW5lZCA/IHRydWUgOiBpbnB1dC5pc011dGFibGU7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGlucHV0OiAnLCBpbnB1dCk7XG4gICAgICBkZWJ1Z0xvZygnIyBzZWxsZXJGZWVCYXNpc1BvaW50czogJywgc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuXG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgaW5zdHMgPSBhd2FpdCBNaW50LmNyZWF0ZU1pbnQoXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNrZXksXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgZmVlUGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAob3B0aW9ucy5mcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHMucHVzaChcbiAgICAgICAgICBNaW50LmNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGlja2V5LFxuICAgICAgICAgICAgb3B0aW9ucy5mcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBibG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W9ucy5wdXNoKFxuICAgICAgICAgIE1pbnQuY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgY29sbGVjdGlvbk1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgY29sbGVjdGlvbnMgPSB7XG4gICAgICAgIGNvbGxlY3Rpb25NZXRhZGF0YTogY29sbGVjdGlvbk1ldGFkYXRhQWNjb3VudCxcbiAgICAgICAgY29sbGVjdGlvbkF1dGhvcml0eTogb3duZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBjb2xsZWN0aW9uTWludDogY29sbGVjdGlvbk1pbnQudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgfTtcblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZVNldENvbGxlY3Rpb25TaXplSW5zdHJ1Y3Rpb24oY29sbGVjdGlvbnMsIHtcbiAgICAgICAgICBzZXRDb2xsZWN0aW9uU2l6ZUFyZ3M6IHtcbiAgICAgICAgICAgIHNpemU6IGNvbGxlY3Rpb25TaXplIHx8IERFRkFVTFRfQ09MTEVDVElPTl9TSVpFLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0pLFxuICAgICAgKTtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICBbb3duZXIudG9LZXlwYWlyKCksIGNvbGxlY3Rpb25NaW50LnRvS2V5cGFpcigpXSxcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIGNvbGxlY3Rpb25NaW50LnB1YmtleSxcbiAgICAgICk7XG4gICAgfSk7XG4gIH07XG59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sICJpbXBvcnRfbXBsX3Rva2VuX21ldGFkYXRhIiwgIlJlZ3VsYXJOZnQiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmVndWxhck5mdCIsICJTcGxUb2tlbiIsICJSZWd1bGFyTmZ0IiwgIkNvbXByZXNzZWROZnQiLCAiUmVndWxhck5mdCIsICJDb21wcmVzc2VkTmZ0Il0KfQo= \ No newline at end of file diff --git a/packages/suite-compressed-nft/dist/index.mjs b/packages/suite-compressed-nft/dist/index.mjs index fb60f6198..11950e258 100644 --- a/packages/suite-compressed-nft/dist/index.mjs +++ b/packages/suite-compressed-nft/dist/index.mjs @@ -1693,11 +1693,11 @@ var CompressedNft; } ); }; - CompressedNft10.setDelegate = async (assetId, signer, options = {}) => { + CompressedNft10.setDelegate = async (mint, owner, options = {}) => { return Try(async () => { const newDelegate = options.delegate ? options.delegate.toPublicKey() : null; - const inst = await (0, CompressedNft10.createDeleagate)(assetId.toPublicKey(), newDelegate); - return new TransactionBuilder6.Common([inst], [signer.toKeypair()]); + const inst = await (0, CompressedNft10.createDeleagate)(mint.toPublicKey(), newDelegate); + return new TransactionBuilder6.Common([inst], [owner.toKeypair()]); }); }; })(CompressedNft || (CompressedNft = {})); @@ -1830,10 +1830,10 @@ var CompressedNft2; import { Transaction as Transaction5 } from "@solana/web3.js"; var CompressedNft3; ((CompressedNft10) => { - CompressedNft10.gasLessDelegate = async (assetId, assetIdOwner, newDelegate) => { + CompressedNft10.gasLessDelegate = async (mint, owner, newDelegate) => { return Try(async () => { const inst = await CompressedNft.createDeleagate( - assetId.toPublicKey(), + mint.toPublicKey(), newDelegate.toPublicKey() ); const blockhashObj = await Node.getConnection().getLatestBlockhash(); @@ -1843,7 +1843,7 @@ var CompressedNft3; feePayer: newDelegate.toPublicKey() }); tx.add(inst); - tx.partialSign(assetIdOwner.toKeypair()); + tx.partialSign(owner.toKeypair()); tx.recentBlockhash = blockhashObj.blockhash; return new TransactionBuilder6.PartialSign( tx.serialize({ @@ -1930,10 +1930,10 @@ var CompressedNft4; } ); }; - CompressedNft10.transfer = async (assetId, assetIdOwner, dest, signers) => { + CompressedNft10.transfer = async (mint, owner, dest, ownerOrMultisig) => { return Try(async () => { - const keypairs = signers.map((s) => s.toKeypair()); - const inst = await (0, CompressedNft10.createTransfer)(assetId, assetIdOwner, dest); + const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); + const inst = await (0, CompressedNft10.createTransfer)(mint, owner, dest); return new TransactionBuilder6.Common([inst], keypairs); }); }; @@ -1942,8 +1942,8 @@ var CompressedNft4; // src/gas-less-transfer.ts var CompressedNft5; ((CompressedNft10) => { - CompressedNft10.gasLessTransfer = async (mint, owner, signer, dest, feePayer) => { - const delegate = await CompressedNft3.gasLessDelegate(mint, signer, feePayer); + CompressedNft10.gasLessTransfer = async (mint, owner, dest, feePayer) => { + const delegate = await CompressedNft3.gasLessDelegate(mint, owner, feePayer); delegate.unwrap().canSubmit = true; const transfer = await Try(async () => { const blockhashObj = await Node.getConnection().getLatestBlockhash(); @@ -1952,7 +1952,14 @@ var CompressedNft5; blockhash: blockhashObj.blockhash, feePayer: feePayer.toPublicKey() }); - inst.add(await CompressedNft4.createTransfer(mint, owner, dest, feePayer)); + inst.add( + await CompressedNft4.createTransfer( + mint, + new Account4.Keypair({ secret: owner }).pubkey, + dest, + feePayer + ) + ); inst.recentBlockhash = blockhashObj.blockhash; return new TransactionBuilder6.PartialSign( inst.serialize({ @@ -2212,9 +2219,9 @@ var CompressedNft6; }; } CompressedNft10.Space = Space; - CompressedNft10.initSpace = (owner, signer, maxDepth, maxBufferSize, canopyDepth, options = {}) => { + CompressedNft10.initSpace = (owner, maxDepth, maxBufferSize, canopyDepth, options = {}) => { return Try(async () => { - const payer = options.feePayer ? options.feePayer : signer; + const payer = options.feePayer ? options.feePayer : owner; const treeOwner = Account4.Keypair.create(); const space = getConcurrentMerkleTreeAccountSize( maxDepth, @@ -2245,7 +2252,7 @@ var CompressedNft6; { merkleTree: treeOwner.toKeypair().publicKey, treeAuthority, - treeCreator: owner.toPublicKey(), + treeCreator: owner.toKeypair().publicKey, payer: payer.toKeypair().publicKey, logWrapper: SPL_NOOP_PROGRAM_ID3, compressionProgram: SPL_ACCOUNT_COMPRESSION_PROGRAM_ID3 @@ -2260,22 +2267,15 @@ var CompressedNft6; ); return new TransactionBuilder6.Mint( instructions, - [treeOwner.toKeypair(), signer.toKeypair()], + [treeOwner.toKeypair(), owner.toKeypair()], payer.toKeypair(), treeOwner.pubkey ); }); }; - CompressedNft10.createSpace = async (owner, signer, spaceSize, options = {}) => { + CompressedNft10.createSpace = async (owner, spaceSize, options = {}) => { const { maxDepth, maxBufferSize, canopyDepth } = calculateSpaceNumberToDepth(spaceSize); - return (0, CompressedNft10.initSpace)( - owner, - signer, - maxDepth, - maxBufferSize, - canopyDepth, - options - ); + return (0, CompressedNft10.initSpace)(owner, maxDepth, maxBufferSize, canopyDepth, options); }; CompressedNft10.calculateSpaceCost = async (spaceSize) => { const { maxDepth, maxBufferSize, canopyDepth } = calculateSpaceNumberToDepth(spaceSize); @@ -2363,16 +2363,17 @@ var CompressedNft7; } ); }; - CompressedNft10.mint = async (owner, signer, input, treeOwner, collectionMint, options = {}) => { + CompressedNft10.mint = async (owner, input, treeOwner, collectionMint, options = {}) => { return Try(async () => { const valid = Validator.checkAll(input); if (valid.isErr) { throw valid.error; } const { feePayer, receiver, delegate } = options; - const payer = feePayer ? feePayer : signer; + const payer = feePayer ? feePayer : owner; const storageType = input.storageType || DEFAULT_STORAGE_TYPE; - const leafOwner = receiver ? receiver : owner; + const ownerPublicKey = owner.toKeypair().publicKey; + const leafOwner = receiver ? receiver.toPublicKey() : ownerPublicKey; const leafDelegate = delegate ? delegate : new Account4.Keypair({ secret: payer }).pubkey; const treeAuthority = Account4.Pda.getTreeAuthority( treeOwner.toPublicKey().toString() @@ -2449,12 +2450,12 @@ var CompressedNft7; { merkleTree: treeOwner.toPublicKey(), treeAuthority, - treeDelegate: owner.toPublicKey(), + treeDelegate: ownerPublicKey, payer: payer.toKeypair().publicKey, - leafOwner: leafOwner.toPublicKey(), + leafOwner, // receiver leafDelegate: leafDelegate.toPublicKey(), - collectionAuthority: owner.toPublicKey(), + collectionAuthority: ownerPublicKey, collectionMint: collectionMint.toPublicKey(), collectionMetadata, editionAccount: collectionMasterEditionAccount, @@ -2483,7 +2484,7 @@ var CompressedNft7; } return new TransactionBuilder6.Mint( instructions, - [signer.toKeypair()], + [owner.toKeypair()], payer.toKeypair(), new CompressedNft6.Space(treeOwner) ); @@ -2505,10 +2506,10 @@ var SplToken; // ../suite-spl-token/src/add.ts var SplToken2; ((SplToken11) => { - SplToken11.add = async (token, owner, signers, totalAmount, mintDecimal, options = {}) => { + SplToken11.add = async (token, owner, ownerOrMultisig, totalAmount, mintDecimal, options = {}) => { return Try(async () => { - const payer = options.feePayer ? options.feePayer : signers[0]; - const keypairs = signers.map((s) => s.toKeypair()); + const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); const tokenAssociated = await Account4.Associated.retryGetOrCreate( token, owner, @@ -2539,14 +2540,14 @@ import { } from "@solana/spl-token"; var SplToken3; ((SplToken11) => { - SplToken11.burn = (mint, owner, signers, burnAmount, tokenDecimals, options = {}) => { + SplToken11.burn = (mint, owner, ownerOrMultisig, burnAmount, tokenDecimals, options = {}) => { return Try(() => { const tokenAccount = getAssociatedTokenAddressSync2( mint.toPublicKey(), owner.toPublicKey() ); - const payer = options.feePayer ? options.feePayer : signers[0]; - const keypairs = signers.map((s) => s.toKeypair()); + const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); const inst = createBurnCheckedInstruction( tokenAccount, mint.toPublicKey(), @@ -2739,12 +2740,12 @@ import { createTransferCheckedInstruction } from "@solana/spl-token"; import { Transaction as Transaction7 } from "@solana/web3.js"; var SplToken6; ((SplToken11) => { - SplToken11.gasLessTransfer = async (mint, owner, dest, signers, amount, mintDecimal, feePayer) => { + SplToken11.gasLessTransfer = async (mint, owner, dest, amount, mintDecimal, feePayer) => { return Try(async () => { - const keypairs = signers.map((s) => s.toKeypair()); + const ownerPublicKey = owner.toKeypair().publicKey; const sourceToken = await Account4.Associated.makeOrCreateInstruction( mint, - owner, + ownerPublicKey.toString(), feePayer ); const destToken = await Account4.Associated.makeOrCreateInstruction( @@ -2764,10 +2765,10 @@ var SplToken6; sourceToken.tokenAccount.toPublicKey(), mint.toPublicKey(), destToken.tokenAccount.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, SplToken.calculateAmount(amount, mintDecimal), mintDecimal, - keypairs + [owner.toKeypair()] ); tx.add(inst2); } else { @@ -2775,17 +2776,15 @@ var SplToken6; sourceToken.tokenAccount.toPublicKey(), mint.toPublicKey(), destToken.tokenAccount.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, SplToken.calculateAmount(amount, mintDecimal), mintDecimal, - keypairs + [owner.toKeypair()] ); tx.add(destToken.inst).add(inst2); } tx.recentBlockhash = blockhashObj.blockhash; - keypairs.forEach((signer) => { - tx.partialSign(signer); - }); + tx.partialSign(owner.toKeypair()); const serializedTx = tx.serialize({ requireAllSignatures: false }); @@ -2885,7 +2884,7 @@ var SplToken7; ); return instructions; }; - SplToken11.mint = async (owner, signer, totalAmount, mintDecimal, input, options = {}) => { + SplToken11.mint = async (owner, totalAmount, mintDecimal, input, options = {}) => { return Try(async () => { const valid = Validator.checkAll(input); if (valid.isErr) { @@ -2893,9 +2892,10 @@ var SplToken7; } const { feePayer, freezeAuthority } = options; const storageType = input.storageType || DEFAULT_STORAGE_TYPE; - const payer = feePayer ? feePayer : signer; + const payer = feePayer ? feePayer : owner; input.royalty = 0; const sellerFeeBasisPoints = 0; + const ownerPublicKey = owner.toKeypair().publicKey; const storageMetadata = Storage.toConvertOffchaindata( input, input.royalty @@ -2938,7 +2938,7 @@ var SplToken7; const mint2 = Account4.Keypair.create(); const insts = await (0, SplToken11.createMint)( mint2.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, totalAmount, mintDecimal, datav2, @@ -2949,14 +2949,14 @@ var SplToken7; insts.push( (0, SplToken11.createFreezeAuthority)( mint2.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, freezeAuthority.toPublicKey() ) ); } return new TransactionBuilder6.Mint( insts, - [signer.toKeypair(), mint2.toKeypair()], + [owner.toKeypair(), mint2.toKeypair()], payer.toKeypair(), mint2.pubkey ); @@ -2996,10 +2996,10 @@ var SplToken8; import { createTransferCheckedInstruction as createTransferCheckedInstruction2 } from "@solana/spl-token"; var SplToken9; ((SplToken11) => { - SplToken11.transfer = async (mint, owner, dest, signers, amount, mintDecimal, options = {}) => { + SplToken11.transfer = async (mint, owner, dest, ownerOrMultisig, amount, mintDecimal, options = {}) => { return Try(async () => { - const payer = options.feePayer ? options.feePayer : signers[0]; - const keypairs = signers.map((s) => s.toKeypair()); + const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); const sourceToken = await Account4.Associated.retryGetOrCreate( mint, owner, @@ -3041,11 +3041,18 @@ var RegularNft; ((RegularNft11) => { const NFT_AMOUNT = 1; const NFT_DECIMALS = 0; - RegularNft11.burn = (mint, owner, signer, options = {}) => { - const feePayer = options.feePayer ? options.feePayer : signer; - return SplToken10.burn(mint, owner, [signer], NFT_AMOUNT, NFT_DECIMALS, { - feePayer - }); + RegularNft11.burn = (mint, owner, ownerOrMultisig, options = {}) => { + const feePayer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + return SplToken10.burn( + mint, + owner, + ownerOrMultisig, + NFT_AMOUNT, + NFT_DECIMALS, + { + feePayer + } + ); }; })(RegularNft || (RegularNft = {})); @@ -3212,15 +3219,16 @@ var RegularNft4; ); return instructions; }; - RegularNft11.mint = async (owner, signer, input, options = {}) => { + RegularNft11.mint = async (owner, input, options = {}) => { return Try(async () => { const valid = Validator.checkAll(input); if (valid.isErr) { throw valid.error; } const { feePayer, freezeAuthority } = options; - const payer = feePayer ? feePayer : signer; + const payer = feePayer ? feePayer : owner; const storageType = input.storageType || DEFAULT_STORAGE_TYPE; + const ownerPublicKey = owner.toKeypair().publicKey; let properties; if (input.properties) { properties = await Converter14.Properties.intoInfra( @@ -3280,7 +3288,7 @@ var RegularNft4; const mint2 = Account4.Keypair.create(); const instructions = await (0, RegularNft11.createMint)( mint2.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, datav2, payer.toKeypair().publicKey, isMutable @@ -3289,7 +3297,7 @@ var RegularNft4; instructions.push( (0, RegularNft11.createDeleagate)( mint2.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, freezeAuthority.toPublicKey() ) ); @@ -3303,7 +3311,7 @@ var RegularNft4; ) ); } - const keypairs = [signer.toKeypair(), mint2.toKeypair()]; + const keypairs = [owner.toKeypair(), mint2.toKeypair()]; if (input.creators) { input.creators.forEach((creator) => { if (Account4.Keypair.isSecret(creator.secret)) { @@ -3329,14 +3337,16 @@ import { Transaction as Transaction8 } from "@solana/web3.js"; var RegularNft5; ((RegularNft11) => { const DEFAULT_STORAGE_TYPE = "nftStorage"; - RegularNft11.gasLessMint = async (owner, signer, input, feePayer, options = {}) => { + RegularNft11.gasLessMint = async (owner, input, feePayer, options = {}) => { return Try(async () => { const valid = Validator.checkAll(input); if (valid.isErr) { throw valid.error; } const storageType = input.storageType || DEFAULT_STORAGE_TYPE; - const sellerFeeBasisPoints = Converter14.Royalty.intoInfra(input.royalty); + const royalty = input.royalty ? input.royalty : 0; + const sellerFeeBasisPoints = Converter14.Royalty.intoInfra(royalty); + const ownerPublickey = owner.toKeypair().publicKey; let uri = ""; if (input.filePath) { const properties = await Converter14.Properties.intoInfra( @@ -3381,7 +3391,7 @@ var RegularNft5; const mint = Account4.Keypair.create(); const insts = await RegularNft4.createMint( mint.toPublicKey(), - owner.toPublicKey(), + ownerPublickey, datav2, feePayer.toPublicKey(), isMutable @@ -3390,7 +3400,7 @@ var RegularNft5; insts.push( RegularNft4.createDeleagate( mint.toPublicKey(), - owner.toPublicKey(), + ownerPublickey, options.freezeAuthority.toPublicKey() ) ); @@ -3403,7 +3413,7 @@ var RegularNft5; }); insts.forEach((inst) => tx.add(inst)); tx.recentBlockhash = blockhashObj.blockhash; - [signer, mint].forEach((signer2) => tx.partialSign(signer2.toKeypair())); + [owner, mint].forEach((signer) => tx.partialSign(signer.toKeypair())); const serializedTx = tx.serialize({ requireAllSignatures: false }); @@ -3418,12 +3428,11 @@ var RegularNft6; ((RegularNft11) => { const NFT_AMOUNT = 1; const NFT_DECIMALS = 0; - RegularNft11.gasLessTransfer = async (mint, owner, dest, signers, feePayer) => { + RegularNft11.gasLessTransfer = async (mint, owner, dest, feePayer) => { return SplToken10.gasLessTransfer( mint, owner, dest, - signers, NFT_AMOUNT, NFT_DECIMALS, feePayer @@ -3437,15 +3446,16 @@ var RegularNft7; ((RegularNft11) => { RegularNft11.DEFAULT_COLLECTION_SIZE = 0; const DEFAULT_STORAGE_TYPE = "nftStorage"; - RegularNft11.mintCollection = (owner, signer, input, options = {}) => { + RegularNft11.mintCollection = (owner, input, options = {}) => { return Try(async () => { const valid = Validator.checkAll(input); if (valid.isErr) { throw valid.error; } const { freezeAuthority, feePayer, collectionSize } = options; - const payer = feePayer ? feePayer : signer; + const payer = feePayer ? feePayer : owner; const storageType = input.storageType || DEFAULT_STORAGE_TYPE; + const ownerPublicKey = owner.toKeypair().publicKey; let properties; if (input.properties) { properties = await Converter14.Properties.intoInfra( @@ -3498,7 +3508,7 @@ var RegularNft7; ); const instructions = await RegularNft4.createMint( collectionMint.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, datav2, payer.toKeypair().publicKey, isMutable @@ -3507,14 +3517,14 @@ var RegularNft7; instructions.push( RegularNft4.createDeleagate( collectionMint.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, freezeAuthority.toPublicKey() ) ); } const collections = { collectionMetadata: collectionMetadataAccount, - collectionAuthority: signer.toKeypair().publicKey, + collectionAuthority: owner.toKeypair().publicKey, collectionMint: collectionMint.toKeypair().publicKey }; instructions.push( @@ -3526,7 +3536,7 @@ var RegularNft7; ); return new TransactionBuilder6.Mint( instructions, - [signer.toKeypair(), collectionMint.toKeypair()], + [owner.toKeypair(), collectionMint.toKeypair()], payer.toKeypair(), collectionMint.pubkey ); @@ -3569,12 +3579,12 @@ var RegularNft9; ((RegularNft11) => { const NFT_AMOUNT = 1; const NFT_DECIMALS = 0; - RegularNft11.transfer = (mint, owner, dest, signers, options = {}) => { + RegularNft11.transfer = (mint, owner, dest, ownerOrMultisig, options = {}) => { return SplToken10.transfer( mint, owner, dest, - signers, + ownerOrMultisig, NFT_AMOUNT, NFT_DECIMALS, options @@ -3598,9 +3608,9 @@ var RegularNft10 = { // src/mint-collection.ts var CompressedNft8; ((CompressedNft10) => { - CompressedNft10.mintCollection = (owner, signer, input, options = {}) => { + CompressedNft10.mintCollection = (owner, input, options = {}) => { const { feePayer, freezeAuthority } = options; - return RegularNft10.mintCollection(owner, signer, input, { + return RegularNft10.mintCollection(owner, input, { feePayer, freezeAuthority }); @@ -3640,4 +3650,4 @@ export { sleep, unixTimestamp }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc2hhcmVkL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvc2hhcmVkLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NhbGN1b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gKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgICBhbGxvd093bmVyT2ZmQ3VydmUgPSBmYWxzZSxcbiAgICApOiBQcm9taXNlPHN0cmluZyB8IENvbW1vblN0cnVjdHVyZTxQdWJrZXk+PiA9PiB7XG4gICAgICBjb25zdCByZXMgPSBhd2FpdCBtYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG5ldyBLZXlwYWlyLktleXBhaXIoeyBzZWNyZXQ6IGZlZVBheWVyIH0pLnB1YmtleSxcbiAgICAgICAgYWxsb3dPd25lck9mZkN1cnZlLFxuICAgICAgKTtcblxuICAgICAgaWYgKCFyZXMuaW5zdCkge1xuICAgICAgICByZXR1cm4gcmVzLnRva2VuQWNjb3VudDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uPFB1YmtleT4oXG4gICAgICAgIFtyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1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LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgYnMgZnJvbSAnYnM1OCc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgQWNjb3VudCB7XG4gIGV4cG9ydCBjbGFzcyBLZXlwYWlyIHtcbiAgICBzZWNyZXQ6IFNlY3JldDtcbiAgICBwdWJrZXk6IFB1YmtleTtcblxuICAgIGNvbnN0cnVjdG9yKHBhcmFtczogeyBwdWJrZXk/OiBQdWJrZXk7IHNlY3JldDogU2VjcmV0IH0pIHtcbiAgICAgIGlmICghcGFyYW1zLnB1YmtleSkge1xuICAgICAgICBjb25zdCBrZXlwYWlyID0gcGFyYW1zLnNlY3JldC50b0tleXBhaXIoKTtcbiAgICAgICAgdGhpcy5wdWJrZXkgPSBrZXlwYWlyLnB1YmxpY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ldGFkYXRhLmltYWdlKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzSW1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4g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HtcbiAgICAgICAgbGltaXQ6IDEwMDAsXG4gICAgICAgIHBhZ2U6IDEsXG4gICAgICAgIHNvcnRCeTogZGVmYXVsdFNvcnRCeSxcbiAgICAgIH07XG4gICAgICBjb25zdCB7IGxpbWl0LCBwYWdlLCBzb3J0QnksIGJlZm9yZSwgYWZ0ZXIgfSA9IHtcbiAgICAgICAgLi4uZGVmYXVsdE9wdGlvbnMsXG4gICAgICAgIC4uLm9wdGlvbnMsXG4gICAgICB9O1xuXG4gICAgICBjb25zdCBhc3NldHMgPSBhd2FpdCBEYXNBcGkuZ2V0QXNzZXRzQnlPd25lcihcbiAgICAgICAgb3duZXIsXG4gICAgICAgIGxpbWl0LFxuICAgICAgICBwYWdlLFxuICAgICAgICBzb3J0QnksXG4gICAgICAgIGJlZm9yZSxcbiAgICAgICAgYWZ0ZXIsXG4gICAgICApO1xuICAgICAgaWYgKGFzc2V0cy5pc0Vycikge1xuICAgICAgICB0aHJvdyBhc3NldHMuZXJyb3I7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGl0ZW1zID0gYXNzZXRzLnZhbHVlLml0ZW1zO1xuXG4gICAgICBjb25zdCBtZXRhZGF0YXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgICAgaXRlbXNcbiAgICAgICAgICAuZmlsdGVyKChpdGVtKSA9PiBpdGVtLmNvbXByZXNzaW9uLmNvbXByZXNzZWQgPT09IHRydWUpXG4gICAgICAgICAgLm1hcChhc3luYyAoaXRlbSkgPT4ge1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgY29uc3Qgb2ZmY2hhaW46IE9mZmNoYWluID0gYXdhaXQgZmV0Y2hPZmZjaGFpbihcbiAgICAgICAgICAgICAgICBpdGVtLmNvbnRlbnQuanNvbl91cmksXG4gICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIGNvbnN0IG1lcmdlZCA9IHtcbiAgICAgICAgICAgICAgICBvbmNoYWluOiBpdGVtLFxuICAgICAgICAgICAgICAgIG9mZmNoYWluOiBvZmZjaGFpbixcbiAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgcmV0dXJuIENvbnZlcnRlci5Db21wcmVzc2VkTmZ0TWV0YWRhdGEuaW50b1VzZXIobWVyZ2VkKTtcbiAgICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBGYWlsZWQgZmV0Y2ggb2ZmY2hhaW4gdXJsOiAnLCBpdGVtLmNvbnRlbnQuanNvbl91cmkpO1xuICAgICAgICAgICAgICByZXR1cm4gQ29udmVydGVyLkNvbXByZXNzZWROZnRNZXRhZGF0YS5pbnRvVXNlcih7XG4gICAgICAgICAgICAgICAgb25jaGFpbjogaXRlbSxcbiAgICAgICAgICAgICAgICBvZmZjaGFpbjoge30sXG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pLFxuICAgICAgKTtcbiAgICAgIHJldHVybiB7XG4gICAgICAgIHBhZ2U6IGFzc2V0cy52YWx1ZS5wYWdlLFxuICAgICAgICB0b3RhbDogYXNzZXRzLnZhbHVlLnRvdGFsLFxuICAgICAgICBsaW1pdDogYXNzZXRzLnZhbHVlLmxpbWl0LFxuICAgICAgICBtZXRhZGF0YXMsXG4gICAgICB9O1xuICAgIH0pO1xuICB9O1xuXG4gIC8qKlxuICAgKiBGaW5kIG5mdCBieSBtaW50IGFkZHJlc3NcbiAgICpcbiAgICogQHBhcmFtIHtQdWJrZXl9IG1pbnRcbiAgICogQHJldHVybiBQcm9taXNlPFJlc3VsdDxOZnRNZXRhZGF0YSwgRXJyb3I+PlxuICAgKi9cbiAgZXhwb3J0IGNvbnN0IGZpbmRCeU1pbnQgPSBhc3luYyAoXG4gICAgbWludDogUHVia2V5LFxuICApOiBQcm9taXNlPFJlc3VsdDxOZnRNZXRhZGF0YSwgRXJyb3I+PiA9PiB7XG4gICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICA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saWNLZXksXG4gICAgICAgICAgbGFtcG9ydHM6XG4gICAgICAgICAgICBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5nZXRNaW5pbXVtQmFsYW5jZUZvclJlbnRFeGVtcHRpb24oc3BhY2UpLFxuICAgICAgICAgIHNwYWNlOiBzcGFjZSxcbiAgICAgICAgICBwcm9ncmFtSWQ6IFNQTF9BQ0NPVU5UX0NPTVBSRVNTSU9OX1BST0dSQU1fSUQsXG4gICAgICAgIH0pLFxuICAgICAgKTtcblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZUNyZWF0ZVRyZWVJbnN0cnVjdGlvbihcbiAgICAgICAgICB7XG4gICAgICAgICAgICBtZXJrbGVUcmVlOiB0cmVlT3duZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICAgdHJlZUF1dGhvcml0eSxcbiAgICAgICAgICAgIHRyZWVDcmVhdG9yOiBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgcGF5ZXI6IHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICAgIGxvZ1dyYXBwZXI6IFNQTF9OT09QX1BST0dSQU1fSUQsXG4gICAgICAgICAgICBjb21wcmVzc2lvblByb2dyYW06IFNQTF9BQ0NPVU5UX0NPTVBSRVNTSU9OX1BST0dSQU1fSUQsXG4gICAgICAgICAgfSxcbiAgICAgICAgICB7XG4gICAgICAgICAgICBtYXhCdWZmZXJTaXplLFxuICAgICAgICAgICAgbWF4RGVwdGgsXG4gICAgICAgICAgICBwdWJsaWM6IGZhbHNlLFxuICAgICAgICAgIH0sXG4gICAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICAgICksXG4gICAgICApO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5NaW50KFxuICAgICAgICBpbnN0cnVjdGlvb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4gICAgICAgICAgICBsb2dXcmFwcGVyOiBTUExfTk9PUF9QUk9HUkFNX0lELFxuICAgICAgICAgICAgY29sbGVjdGlvbkF1dGhvcml0eVJlY29yZFBkYTogQlVCQkxFR1VNX1BST0dSQU1fSUQsXG4gICAgICAgICAgICBjb21wcmVzc2lvblByb2dyYW06IFNQTF9BQ0NPVU5UX0NPTVBSRVNTSU9OX1BST0dSQU1fSUQsXG4gICAgICAgICAgICB0b2tlbk1ldGFkYXRhUHJvZ3JhbTogVE9LRU5fTUVUQURBVEFfUFJPR1JBTV9JRCxcbiAgICAgICAgICB9LFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIG1ldGFkYXRhQXJncyxcbiAgICAgICAgICB9LFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgaWYgKGlucHV0LmNyZWF0b3JzKSB7XG4gICAgICAgIGNvbnN0IGFzc2V0SWQgPSBhd2FpdCBuZXcgU3BhY2UuU3BhY2UodHJlZU93bmVyKS5nZXRBc3NldElkKCk7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGF3YWl0IGNyZWF0ZVZlcmlmeUNyZWF0b3IoXG4gICAgICAgICAgICBtZXRhZGF0YUFyZ3MuY3JlYXRvcnMsXG4gICAgICAgICAgICBhc3NldElkLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICB0cmVlT3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG1ldGFkYXRhQXJncyxcbiAgICAgICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5NaW50KFxuICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgIFtzaWduZXIudG9LZXlwYWlyKCldLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgbmV3IFNwYWNlL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nMuZmVlUGF5ZXIgPyBvcHRpb25zLmZlZVBheWVyIDogc2lnbmVyc1swXTtcbiAgICAgIGNvbnN0IGtleXBhaXJzID0gc2lnbmVycy5tYXAoKHMpID0+IHMudG9LZXlwYWlyKCkpO1xuXG4gICAgICBjb25zdCB0b2tlbkFzc29jaWF0ZWQgPSBhd2FpdCBBY2NvdW50LkFzc29jaWF0ZWQucmV0cnlHZXRPckNyZWF0ZShcbiAgICAgICAgdG9rZW4sXG4gICAgICAgIG93bmVyLFxuICAgICAgICBwYXllcixcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBDYWxjdWxhdGUuY2FsY3VsYXRlQW1vdW50KHRvdGFsQW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBrZXlwYWlycyxcbiAgICAgICk7XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbjxQdWJrZXk+KFxuICAgICAgICBbaW5zdF0sXG4gICAgICAgIGtleXBhaXJzLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgdG9rZW4sXG4gICAgICApO1xuICAgIH0pO1xuICB9O1xufVxuIiwgIi8vQGludGVybmFsXG5leHBvcnQgbmFtZXNwYWNlIFNwbFRva2VuIHtcbiAgZXhwb3J0IGNvbnN0IGNhbGN1bGF0ZUFtb3VudCA9IChcbiAgICBhbW91bnQ6IG51bWJlcixcbiAgICBtaW50RGVjaW1hbDogbnVtYmVyLFxuICApOiBudW1iZXIgPT4ge1xuICAgIHJldHVybiBhbW91bnQgKiAxMCAqKiBtaW50RGVj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XG4gICAgICAgIGlmIChpc0hvbGRlciAmJiBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby50b2tlbkFtb3VudC51aUFtb3VudCA8IDEpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhcbiAgICAgICAgICAgICcjIGZpbmRCeU93bmVyIG5vIGhvbGQgbWV0YWRhdGE6ICcsXG4gICAgICAgICAgICBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mbyxcbiAgICAgICAgICApO1xuICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IG1pbnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby5taW50IGFzIFB1YmtleTtcbiAgICAgICAgY29uc3QgdG9rZW5BbW91bnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby50b2tlbkFtb3VudFxuICAgICAgICAgIC5hbW91bnQgYXMgc3RyaW5nO1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgY29uc3QgbWV0YWRhdGEgPSBhd2FpdCBNZXRhZGF0YS5mcm9tQWNjb3VudEFkZHJlc3MoXG4gICAgICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICAgICAgQWNjb3VudC5QZGEuZ2V0TWV0YWRhdGEobWludCksXG4gICAgICAgICAgKTtcbiAgICAgICAgICBkZWJ1Z0xvZygnIyBmaW5kQnlPd25lciBtZXRhZGF0YTogJywgbWV0YWRhdGEpO1xuICAgICAgICAgIC8vIHRva2VuU3RhbmRhcmQ6IDAoTkZUKSBvciAyIChTUEwtVE9LRU4pXG4gICAgICAgICAgaWYgKG1ldGFkYXRhLnRva2VuU3RhbmRhcmQgIT09IHRva2VuU3RhbmRhcmQpIHtcbiAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgIH1cbiAgICAgICAgICBmZXRjaChtZXRhZGF0YS5kYXRhLnVyaSlcbiAgICAgICAgICAgIC50aGVuKChyZXNwb25zZSkgPT4ge1xuICAgICAgICAgICAgICByZXNwb25zZVxuICAgICAgICAgICAgICAgIC5qc29uKClcbiAgICAgICAgICAgICAgICAudGhlbigoanNvbjogT2ZmY2hhaW4pID0+IHtcbiAgICAgICAgICAgICAgICAgIGRhdGEucHVzaChcbiAgICAgICAgICAgICAgICAgICAgY29udmVydGVyPFQ+KHRva2VuU3RhbmRhcmQsIG1ldGFkYXRhLCBqc29uLCB0b2tlbkFtb3VudCksXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgY2FsbGJhY2soUmVzdWx0Lm9rKGRhdGEpKTsgLy8gbmVlZCB0aGlzIGNhbGwgP1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgLmNhdGNoKChlKSA9PiB7XG4gICAgICAgICAgICAgICAgICBjYWxsYmFjayhSZXN1bHQuZXJyKGUpKTtcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIC5maW5hbGx5KCgpID0+IHtcbiAgICAgICAgICAgICAgICAgIGNvbnN0IGRlc2NBbGdvID0gc29ydEJ5VWluaXhUaW1lc3RhbXA8VD4oU29ydERpcmVjdGlvbi5EZXNjKTtcbiAgICAgICAgICAgICAgICAgIGNvbnN0IGFzY0FsZ28gPSBzb3J0QnlVaW5peFRpbWVzdGFtcDxUPihTb3J0RGlyZWN0aW9uLkFzYyk7XG4gICAgICAgICAgICAgICAgICBpZiAoc29ydGFibGUgPT09IFNvcnREaXJlY3Rpb24uRGVzYykge1xuICAgICAgICAgICAgICAgICAgICBkYXRhID0gZGF0YS5zb3J0KGRlc2NBbGdvKTtcbiAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoc29ydGFibGUgPT09IFNvcnREaXJlY3Rpb24uQXNjKSB7XG4gICAgICAgICAgICAgICAgICAgIGRhdGEgPSBkYXRhLnNvcnQoYXNjQWxnbyk7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICBjYWxsYmFjayhSZXN1bHQub2soZGF0YSkpO1xuIC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lVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgc291cmNlVG9rZW4udG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGRlc3RUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIENhbGN1bGF0b3IuY2FsY3VsYXRlQW1vdW50KGFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICAgIGtleXBhaXJzLFxuICAgICAgICApO1xuICAgICAgICB0eC5hZGQoaW5zdDIpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgLy8gcmV0dXJuIGluc3RydWN0aW9uIGFuZCB1bmRlY2lkZWQgYXNzb2NpYXRlZCB0b2tlbiBhY2NvdW50XG4gICAgICAgIGluc3QyID0gY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgc291cmNlVG9rZW4udG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGRlc3RUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIENhbGN1bGF0b3IuY2FsY3VsYXRlQW1vdW50KGFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICAgIGtleXBhaXJzLFxuICAgICAgICApO1xuICAgICAgICB0eC5hZGQoZGVzdFRva2VuLmluc3QpLmFkZChpbnN0Mik7XG4gICAgICB9XG5cbiAgICAgIHR4LnJlY2VudEJsb2NraGFzaCA9IGJsb2NraGFzaE9iai5ibG9ja2hhc2g7XG4gICAgICBrZX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dWJrZXk6IGZlZVBheWVyLFxuICAgICAgICBuZXdBY2NvdW50UHVia2V5OiBtaW50LFxuICAgICAgICBzcGFjZTogTUlOVF9TSVpFLFxuICAgICAgICBsYW1wb3J0czogbGFtcG9ydHMsXG4gICAgICAgIHByb2dyYW1JZDogVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgIH0pLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUluaXRpYWxpemVNaW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBvd25lcixcbiAgICAgICAgb3duZXIsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgZmVlUGF5ZXIsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG1pbnQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgQ2FsY3VsYXRlLmNhbGN1bGF0ZUFtb3VudCh0b3RhbEFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWV0YWRhdGFBY2NvdW50VjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIG1ldGFkYXRhOiBtZXRhZGF0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FxuICAgICAgICB1cmksXG4gICAgICAgIHNlbGxlckZlZUJhc2lzUG9pbnRzLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuICAgICAgZGVidWdMb2coJyMgdXBsb2FkIGNvbnRlbnQgdXJsOiAnLCB1cmkpO1xuXG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgaW5zdHMgPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIHRvdGFsQW1vdW50LFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZUZyZWV6ZUF1dGhvcml0eShcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5NaW50KFxuICAgICAgICBpbnN0cyxcbiAgICAgICAgW3NpZ25lci50b0tleXBhaXIoKSwgbWludC50b0tleXBhaXIoKV0sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBtaW50LnB1YmtleSxcbiAgICAgICk7XG4gICAgfSk7XG4gIH07X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c3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgbWV0YWRhdGE6IHRva2VuTWV0YWRhdGFQdWJrZXksXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3VudEFyZ3NWMzoge1xuICAgICAgICAgICAgZGF0YTogbmZ0TWV0YWRhdGEsXG4gICAgICAgICAgICBpc011dGFibGUsXG4gICAgICAgICAgICBjb2xsZWN0aW9uRGV0YWlsczogbnVsbCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNYXN0ZXJFZGl0aW9uVjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIGVkaXRpb246IG1hc3RlckVkaXRpb25QdWJrZXksXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICBtZXRhZGF0YTogdG9rZW5NZXRhZGF0YVB1YmtleSxcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1hc3RlckVkaXRpb25BcmdzOiB7XG4gICAgICAgICAgICBtYXhTdXBwbHk6IDAsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcbiAgICByZXR1cm4gaW5zdHJ1Y3Rpb25zO1xuICB9O1xuXG4gIC8qKlxuICAgKiBVcGxvYWQgY29udGVudCBhbmQgTkZUIG1pbn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0IHNldCBmaWxlUGF0aCcgb3IgJ3VyaSdgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZGF0YXYyID0gQ29udmVydGVyLlJlZ3VsYXJOZnRNZXRhZGF0YS5pbnRvSW5mcmEoXG4gICAgICAgIGlucHV0LFxuICAgICAgICB1cmksXG4gICAgICAgIHNlbGxlckZlZUJhc2lzUG9pbnRzLFxuICAgICAgKTtcblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gaW5wdXQuaXNNdXRhYmxlID09PSB1bmRlZmluZWQgPyB0cnVlIDogaW5wdXQuaXNNdXRhYmxlO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBpbnB1dDogJywgaW5wdXQpO1xuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuXG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuXG4gICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIC8vIGNvbGxlY3Rpb24gLS0tXG4gICAgICBpZiAoaW5wdXQuY29sbGVjdGlvbikge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVWZXJpZnlTaXplZENvbGxlY3Rpb24oXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBpbnB1dC5jb2xsZWN0aW9uLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3Qga2V5cGFpcnMgPSBbc2lnbmVyLnRvS2V5cGFpcigpLCBtaW50LnRvS2V5cGFpcigpXTtcblxuICAgICAgLy8gY3JlYXRvciAtLS1cbiAgICAgIGlmIChpbnB1dC5jcmVhdG9ycykge1xuICAgICAgICBpbnB1dC5jcmVhdG9ycy5mb3JFYWNoKChjcmVhdG9yKSA9PiB7XG4gICAgICAgICAgaWYgKEFjY291bnQuS2V5cGFpci5pc1NlY3JldChjcmVhdG9yLnNlY3JldCkpIHtcbiAgICAgICAgICAgIGNvbnN0IGNyZWF0b3JQdWJrZXkgPSBjcmVhdG9yLmFkZHJlc3MudG9QdWJsaWNLZXkoKTtcbiAgICAgICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVWZXJpZnlDcmVhdG9yKG1pbnQudG9QdWJsaWNLZXkoKSwgY3JlYXRvclB1YmtleSk7XG4gICAgICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChpbnN0KTtcbiAgICAgICAgICAgIGtleXBhaXJzLnB1c2goY3JlYXRvci5zZWNyZXQudG9LZXlwYWlyKCkpO1xuICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLk1pbnQoXG4gICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAga2V5cGFpcnMsXG4gICAgIC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gICAgICBhbGxvd093bmVyT2ZmQ3VydmUgPSBmYWxzZSxcbiAgICApOiBQcm9taXNlPHN0cmluZyB8IENvbW1vblN0cnVjdHVyZTxQdWJrZXk+PiA9PiB7XG4gICAgICBjb25zdCByZXMgPSBhd2FpdCBtYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG5ldyBLZXlwYWlyLktleXBhaXIoeyBzZWNyZXQ6IGZlZVBheWVyIH0pLnB1YmtleSxcbiAgICAgICAgYWxsb3dPd25lck9mZkN1cnZlLFxuICAgICAgKTtcblxuICAgICAgaWYgKCFyZXMuaW5zdCkge1xuICAgICAgICByZXR1cm4gcmVzLnRva2VuQWNjb3VudDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uPFB1YmtleT4oXG4gICAgICAgIFtyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7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ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgYnMgZnJvbSAnYnM1OCc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgQWNjb3VudCB7XG4gIGV4cG9ydCBjbGFzcyBLZXlwYWlyIHtcbiAgICBzZWNyZXQ6IFNlY3JldDtcbiAgICBwdWJrZXk6IFB1YmtleTtcblxuICAgIGNvbnN0cnVjdG9yKHBhcmFtczogeyBwdWJrZXk/OiBQdWJrZXk7IHNlY3JldDogU2VjcmV0IH0pIHtcbiAgICAgIGlmICghcGFyYW1zLnB1YmtleSkge1xuICAgICAgICBjb25zdCBrZXlwYWlyID0gcGFyYW1zLnNlY3JldC50b0tleXBhaXIoKTtcbiAgICAgICAgdGhpcy5wdWJrZXkgPSBrZXlwYWlyLnB1YmxpY0tleS50b1N0cmluZygpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhpcy5wdWJrZXkgPSBwYXJhbXMucHVia2V5O1x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ICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkY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6IGRlZmF1bHRTb3J0QnksXG4gICAgICB9O1xuICAgICAgY29uc3QgeyBsaW1pdCwgcGFnZSwgc29ydEJ5LCBiZWZvcmUsIGFmdGVyIH0gPSB7XG4gICAgICAgIC4uLmRlZmF1bHRPcHRpb25zLFxuICAgICAgICAuLi5vcHRpb25zLFxuICAgICAgfTtcblxuICAgICAgY29uc3QgYXNzZXRzID0gYXdhaXQgRGFzQXBpLmdldEFzc2V0c0J5T3duZXIoXG4gICAgICAgIG93bmVyLFxuICAgICAgICBsaW1pdCxcbiAgICAgICAgcGFnZSxcbiAgICAgICAgc29ydEJ5LFxuICAgICAgICBiZWZvcmUsXG4gICAgICAgIGFmdGVyLFxuICAgICAgKTtcbiAgICAgIGlmIChhc3NldHMuaXNFcnIpIHtcbiAgICAgICAgdGhyb3cgYXNzZXRzLmVycm9yO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBpdGVtcyA9IGFzc2V0cy52YWx1ZS5pdGVtcztcblxuICAgICAgY29uc3QgbWV0YWRhdGFzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGl0ZW1zXG4gICAgICAgICAgLmZpbHRlcigoaXRlbSkgPT4gaXRlbS5jb21wcmVzc2lvbi5jb21wcmVzc2VkID09PSB0cnVlKVxuICAgICAgICAgIC5tYXAoYXN5bmMgKGl0ZW0pID0+IHtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgIGNvbnN0IG9mZmNoYWluOiBPZmZjaGFpbiA9IGF3YWl0IGZldGNoT2ZmY2hhaW4oXG4gICAgICAgICAgICAgICAgaXRlbS5jb250ZW50Lmpzb25fdXJpLFxuICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICBjb25zdCBtZXJnZWQgPSB7XG4gICAgICAgICAgICAgICAgb25jaGFpbjogaXRlbSxcbiAgICAgICAgICAgICAgICBvZmZjaGFpbjogb2ZmY2hhaW4sXG4gICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgIHJldHVybiBDb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RTb3J0QnksXG4gICAgICB9O1xuICAgICAgY29uc3QgeyBsaW1pdCwgcGFnZSwgc29ydEJ5LCBiZWZvcmUsIGFmdGVyIH0gPSB7XG4gICAgICAgIC4uLmRlZmF1bHRPcHRpb25zLFxuICAgICAgICAuLi5vcHRpb25zLFxuICAgICAgfTtcblxuICAgICAgY29uc3QgYXNzZXRzID0gYXdhaXQgRGFzQXBpLmdldEFzc2V0c0J5R3JvdXAoXG4gICAgICAgICdjb2xsZWN0aW9uJyxcbiAgICAgICAgY29sbGVjdGlvbk1pbnQsXG4gICAgICAgIGxpbWl0LFxuICAgICAgICBwYWdlLFxuICAgICAgICBzb3J0QnksXG4gICAgICAgIGJlZm9yZSxcbiAgICAgICAgYWZ0ZXIsXG4gICAgICApO1xuICAgICAgaWYgKGFzc2V0cy5pc0Vycikge1xuICAgICAgICB0aHJvdyBhc3NldHMuZXJyb3I7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGl0ZW1zID0gYXNzZXRzLnZhbHVlLml0ZW1zO1xuXG4gICAgICBjb25zdCBtZXRhZGF0YXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgICAgaXRlbXNcbiAgICAgICAgICAuZmlsdGVyKChpdGVtKSA9PiBpdGVtLmNvbXByZXNzaW9uLmNvbXByZXNzZWQgPT09IHRydWUpXG4gICAgICAgICAgLm1hcChhc3luYyAoaXRlbSkgPT4ge1xuICAgICAgICAgICAgY29uc3Qgb2ZmY2hhaW46IE9mZmNoYWluID0gYXdhaXQgZmV0Y2hPZmZjaGFpbihcbiAgICAgICAgICAgICAgaXRlbS5jb250ZW50Lmpzb25fdXJpLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGNvbnN0IG1lcmdlZCA9IHtcbiAgICAgICAgICAgICAgb25jaGFpbjogaXRlbSxcbiAgICAgICAgICAgICAgb2ZmY2hhaW46IG9mZmNoYWluLFxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHJldHVybiBDb252ZXJ0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2V0Q29ubmVjdGlvbigpLmdldE1pbmltdW1CYWxhbmNlRm9yUmVudEV4ZW1wdGlvbihzcGFjZSksXG4gICAgICAgICAgc3BhY2U6IHNwYWNlLFxuICAgICAgICAgIHByb2dyYW1JZDogU1BMX0FDQ09VTlRfQ09NUFJFU1NJT05fUFJPR1JBTV9JRCxcbiAgICAgICAgfSksXG4gICAgICApO1xuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlQ3JlYXRlVHJlZUluc3RydWN0aW9uKFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIG1lcmtsZVRyZWU6IHRyZWVPd25lci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgICB0cmVlQXV0aG9yaXR5LFxuICAgICAgICAgICAgdHJlZUNyZWF0b3I6IG93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICAgIHBheWVyOiBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgICBsb2dXcmFwcGVyOiBTUExfTk9PUF9QUk9HUkFNX0lELFxuICAgICAgICAgICAgY29tcHJlc3Npb25Qcm9ncmFtOiBTUExfQUNDT1VOVF9DT01QUkVTU0lPTl9QUk9HUkFNX0lELFxuICAgICAgICAgIH0sXG4gICAgICAgICAge1xuICAgICAgICAgICAgbWF4QnVmZmVyU2l6ZSxcbiAgICAgICAgICAgIG1heERlcHRoLFxuICAgICAgICAgICAgcHVibGljOiBmYWxzZSxcbiAgICAgICAgICB9LFxuICAgICAgICAgIE1QTF9CVUJCTEVHVU1fUFJPR1JBTV9JRC50b1B1YmxpY0tleSgpLFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICBbdHJlZU93bmVyLnRvS2V5cGFpcigpLCBvd25lci50b0tleXBhaXIoK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WU6IGFzc2V0UHJvb2YudHJlZV9pZC50b1B1YmxpY0tleSgpLFxuICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG5cbiAgICAgICAgbG9nV3JhcHBlcjogU1BMX05PT1BfUFJPR1JBTV9JRCxcbiAgICAgICAgY29tcHJlc3Npb25Qcm9ncmFtOiBTUExfQUNDT1VOVF9DT01QUkVTU0lPTl9QUk9HUkFNX0lELFxuICAgICAgICBjcmVhdG9yOiBmZWVQYXllcixcblxuICAgICAgICAvLyBwcm92aWRlIHRoZSBzbGljZWQgcHJvb2ZcbiAgICAgICAgYW5jaG9yUmVtYWluaW5nQWNjb3VudHM6IHNsaWNlZFByb29mLFxuICAgICAgfSxcbiAgICAgIHtcbiAgICAgICAgcm9vdDogWy4uLmFzc2V0UHJvb2Yucm9vdC50cmltKCkudG9QdWJsaWNLZXkoKS50b0J5dGVzKCldLFxuICAgICAgICBjcmVhdG9ySGFzaDogWy4uLmNvbXB1dGVDcmVhdG9ySGFzaChjcmVhdG9ycyldLFxuICAgICAgICBkYXRhSGFzaDogWy4uLmNvbXB1dGVEYXRhSGFzaChtZXRhZGF0YSldLFxuICAgICAgICBub25jZTogY29tcHJlc3Npb24ubGVhZl9pZCxcbiAgICAgICAgaW5kZXg6IGNvbXByZXNzaW9uLmxlYWZfaWQsXG4gICAgICAgIG1lc3NhZ2U6IG1ldGFkYXRhLFxuICAgICAgfSxcbiAgICApO1xuICB9O1xuXG4gIC8qKlxuICAgKiBVcGxvYWQgY29udGVudCBhbmQgQ29tcHJlc3NlZCBORlQgbWludFxuICAgKlxuICAgKiBAcGFyYW0ge1NlY3JldH0gb3duZXIgICAgICAgICAvLyBvd25lcidzIFNlY3JldFxuICAgKiBAcGFyYW0ge0lucHV0TmZ0TWV0YWRhdGF9IGlucHV0XG4gICAqIHtcbiAgICogICBuYW1lOiBzdHJpbmcgICAgICAgICAgICAgICAvLyBuZnQgY29udGVudCBuYW1lXG4gICAqICAgc3ltYm9sOiBzdHJpbmcgICAg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4gICAgICBkZWJ1Z0xvZygnIyBtZXRhZGF0YUFyZ3M6ICcsIG1ldGFkYXRhQXJncyk7XG5cbiAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IFtdO1xuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZU1pbnRUb0NvbGxlY3Rpb25WMUluc3RydWN0aW9uKFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIG1lcmtsZVRyZWU6IHRyZWVPd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgdHJlZUF1dGhvcml0eSxcbiAgICAgICAgICAgIHRyZWVEZWxlZ2F0ZTogb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBwYXllcjogcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICAgbGVhZk93bmVyOiBsZWFmT3duZXIsIC8vIHJlY2VpdmVyXG4gICAgICAgICAgICBsZWFmRGVsZWdhdGU6IGxlYWZEZWxlZ2F0ZS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgY29sbGVjdGlvbkF1dGhvcml0eTogb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBjb2xsZWN0aW9uTWludDogY29sbGVjdGlvbk1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25NZXRhZGF0YSxcbiAgICAgICAgICAgIGVkaXRpb25BY2NvdW50OiBjb2xsZWN0aW9uTWFzdGVyRWRpdGlvbkFjY291bnQsXG4gICAgICAgICAgICBidWJibGVndW1TaWduZXIsXG4gICAgICAgICAgICBsb2dXcmFwcGVyOiBTUExfTk9PUF9QUk9HUkFNX0lELFxuICAgICAgICAgICAgY29sbGVjdGlvbkF1dGhvcml0eVJlY29yZFBkYTogQlVCQkxFR1VNX1BST0dSQU1fSUQsXG4gICAgICAgICAgICBjb21wcmVzc2lvblByb2dyYW06IFNQTF9BQ0NPVU5UX0NPTVBSRVNTSU9OX1BST0dSQU1fSUQsXG4gICAgICAgICAgICB0b2tlbk1ldGFkYXRhUHJvZ3JhbTogVE9LRU5fTUVUQURBVEFfUFJPR1JBTV9JRCxcbiAgICAgICAgICB9LFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIG1ldGFkYXRhQXJncyxcbiAgICAgICAgICB9LFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgaWYgKGlucHV0LmNyZWF0b3JzKSB7XG4gICAgICAgIGNvbnN0IGFzc2V0SWQgPSBhd2FpdCBuZXcgU3BhY2UuU3BhY2UodHJlZU93bmVyKS5nZXRBc3NldElkKCk7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGF3YWl0IGNyZWF0ZVZlcmlmeUNyZWF0b3IoXG4gICAgICAgICAgICBtZXRhZGF0YUFyZ3MuY3JlYXRvcnMsXG4gICAgICAgICAgICBhc3NldElkLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICB0cmVlT3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG1ldGFkYXRhQXJncyxcbiAgICAgICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5NaW50KFxuICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgIFtvd25lci50b0tleXBhaXIoKV0sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBuZXcgU3BhY2UuU3BhY2UodHJlZU93bmVyKSxcbiAgICAgICk7XG4gICAgfSk7XG4gIH07XG59XG4iLCAiaW1wb3J0IHsgY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uIH0gZnJvbSAnQHNvbGFuYS9zcGwtdG9rZW4nO1xuaW1wb3J0IHsgUmVzdWx0LCBUcnkgfSBmcm9tICd+L3NoYXJlZCc7XG5pb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uICAgICAgICAgICAgJyMgZmluZEJ5T3duZXIgbm8gaG9sZCBtZXRhZGF0YTogJyxcbiAgICAgICAgICAgIGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLFxuICAgICAgICAgICk7XG4gICAgICAgICAgY29udGludWU7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgbWludCA9IGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLm1pbnQgYXMgUHVia2V5O1xuICAgICAgICBjb25zdCB0b2tlbkFtb3VudCA9IGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLnRva2VuQW1vdW50XG4gICAgICAgICAgLmFtb3VudCBhcyBzdHJpbmc7XG5cbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICBjb25zdCBtZXRhZGF0YSA9IGF3YWl0IE1ldGFkYXRhLmZyb21BY2NvdW50QWRkcmVzcyhcbiAgICAgICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgICAgICBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShtaW50KSxcbiAgICAgICAgICApO1xuICAgICAgICAgIGRlYnVnTG9nKCcjIGZpbmRCeU93bmVyIG1ldGFkYXRhOiAnLCBtZXRhZGF0YSk7XG4gICAgICAgICAgLy8gdG9rZW5TdGFuZGFyZDogMChORlQpIG9yIDIgKFNQTC1UT0tFTilcbiAgICAgICAgICBpZiAobWV0YWRhdGEudG9rZW5TdGFuZGFyZCAhPT0gdG9rZW5TdGFuZGFyZCkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuICAgICAgICAgIGZldGNoKG1ldGFkYXRhLmRhdGEudXJpKVxuICAgICAgICAgICAgLnRoZW4oKHJlc3BvbnNlKSA9PiB7XG4gICAgICAgICAgICAgIHJlc3BvbnNlXG4gICAgICAgICAgICAgICAgLmpzb24oKVxuICAgICAgICAgICAgICAgIC50aGVuKChqc29uOiBPZmZjaGFpbikgPT4ge1xuICAgICAgICAgICAgICAgICAgZGF0YS5wdXNoKFxuICAgICAgICAgICAgICAgICAgICBjb252ZXJ0ZXI8VD4odG9rZW5TdGFuZGFyZCwgbWV0YWRhdGEsIGpzb24sIHRva2VuQW1vdW50KSxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICBjYWxsYmFjayhSZXN1bHQub2soZGF0YSkpOyAvLyBuZWVkIHRoaXMgY2FsbCA/XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAuY2F0Y2goKGUpID0+IHtcbiAgICAgICAgICAgICAgICAgIGNhbGxiYWNrKFJlc3VsdC5lcnIoZSkpO1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgLmZpbmFsbHkoKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgY29uc3QgZGVzY0FsZ28gPSBzb3J0QnlVaW5peFRpbWVzdGFtcDxUPihTb3J0RGlyZWN0aW9uLkRlc2MpO1xuICAgICAgICAgICAgICAgICAgY29uc3QgYXNjQWxnbyA9IHNvcnRCeVVpbml4VGltZXN0YW1wPFQ+KFNvcnREaXJlY3Rpb24uQXNjKTtcbiAgICAgICAgICAgICAgICAgIGlmIChzb3J0YWJsZSA9PT0gU29ydERpcmVjdGlvbi5EZXNjKSB7XG4gICAgICAgICAgICAgICAgICAgIGRhdGEgPSBkYXRhLnNvcnQoZGVzY0FsZ28pO1xuICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChzb3J0YWJsZSA9PT0gU29ydERpcmVjdGlvbi5Bc2MpIHtcbiAgICAgICAgICAgICAgICAgICAgZGF0YSA9IGRhdGEuc29ydChhc2NBbGdvKTtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIGNhbGxiYWNrKFJlc3VsdC5vayhkYXRhKSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgLmNhdGNoKChlKSA9PiB7XG4gICAgICAgICAgICAgIGNhbGxiYWNrKFJlc3VsdC5l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vbnN0IHNvdXJjZVRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLm1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBvd25lclB1YmxpY0tleS50b1N0cmluZygpLFxuICAgICAgICBmZWVQYXllcixcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGRlc3RUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5tYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgZGVzdCxcbiAgICAgICAgZmVlUGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBsZXQgaW5zdDI7XG4gICAgICBjb25zdCBibG9ja2hhc2hPYmogPSBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5nZXRMYXRlc3RCbG9ja2hhc2goKTtcblxuICAgICAgY29uc3QgdHggPSBuZXcgVHJhbnNhY3Rpb24oe1xuICAgICAgICBsYXN0VmFsaWRCbG9ja0hlaWdodDogYmxvY2toYXNoT2JqLmxhc3RWYWxpZEJsb2NrSGVpZ2h0LFxuICAgICAgICBibG9ja2hhc2g6IGJsb2NraGFzaE9iai5ibG9ja2hhc2gsXG4gICAgICAgIGZlZVBheWVyOiBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgfSk7XG5cbiAgICAgIC8vIHJldHVybiBhc3NvY2lhdGVkIHRva2VuIGFjY291bnRcbiAgICAgIGlmICghZGVzdFRva2VuLmluc3QpIHtcbiAgICAgICAgaW5zdDIgPSBjcmVhdGVUcmFuc2ZlckNoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgICBzb3VyY2VUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgZGVzdFRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgIENhbGN1bGF0b3IuY2FsY3VsYXRlQW1vdW50KGFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICAgIFtvd25lci50b0tleXBhaXIoKV0sXG4gICAgICAgICk7XG4gICAgICAgIHR4LmFkZChpbnN0Mik7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICAvLyByZXR1cm4gaW5zdHJ1Y3Rpb24gYW5kIHVuZGVjaWRlZCBhc3NvY2lhdGVkIHRva2VuIGFjY291bnRcbiAgICAgICAgaW5zdDIgPSBjcmVhdGVUcmFuc2ZlckNoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgICBzb3VyY2VUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgZGVzdFRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgIENhbGN1bGF0b3IuY2FsY3VsYXRlQW1vdW50KGFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICAgIFtvd25lci50b0tleXBhaXIoKV0sXG4gICAgICAgICk7XG4gICAgICAgIHR4LmFkZChkZXN0VG9rZW4uaW5zdCkuYWRkKGluc3QyKTtcbiAgICAgIH1cblxuICAgICAgdHgucmVjZW50QmxvY2toYXNoID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcbiAgICAgIHR4LnBhcnRpYWxTaWduKG93bmVyLnRvS2V5cGFpcigpKTtcblxuICAgICAgY29uc3Qgc2VyaWFsaXplZFR4ID0gdHguc2VyaWFsaXplKHtcbiAgICAgICAgcmVxdWlyZUFsbFNpZ25hdHVyZXM6IGZhbHNlLFxuICAgICAgfSk7XG4gICAgICBjb25zdCBoZXggPSBzZXJpYWxpem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9ucy5wdXNoKFxuICAgICAgY3JlYXRlSW5pdGlhbGl6ZU1pbnRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBvd25lcixcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICBmZWVQYXllcixcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgbWludCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBDYWxjdWxhdGUuY2FsY3VsYXRlQW1vdW50KHRvdGFsQW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNZXRhZGF0YUFjY291bnRWM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgbWV0YWRhdGE6IG1ldGFkYXRhUGRhLFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNZXRhZGF0YUFjY291bnRBcmdzVjM6IHtcbiAgICAgICAgICAg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gICBwYXllcixcbiAgICAgICAgKTtcblxuICAgICAgICBpZiAodXBsb2FkZWQuaXNFcnIpIHtcbiAgICAgICAgICB0aHJvdyB1cGxvYWRlZDtcbiAgICAgICAgfVxuICAgICAgICB1cmkgPSB1cGxvYWRlZC52YWx1ZTtcbiAgICAgIH0gZWxzZSBpZiAoaW5wdXQudXJpKSB7XG4gICAgICAgIGNvbnN0IGltYWdlID0geyBpbWFnZTogaW5wdXQudXJpIH07XG4gICAgICAgIGNvbnN0IHVwbG9hZGVkID0gYXdhaXQgU3RvcmFnZS51cGxvYWREYXRhKFxuICAgICAgICAgIHsgLi4uc3RvcmFnZU1ldGFkYXRhLCAuLi5pbWFnZSB9LFxuICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgIHBheWVyLFxuICAgICAgICApO1xuICAgICAgICBpZiAodXBsb2FkZWQuaXNFcnIpIHtcbiAgICAgICAgICB0aHJvdyB1cGxvYWRlZDtcbiAgICAgICAgfVxuICAgICAgICB1cmkgPSB1cGxvYWRlZC52YWx1ZTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHRocm93IEVycm9yKGBNdXN0IHNldCBmaWxlUGF0aCcgb3IgJ3VyaSdgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gdHJ1ZTtcblxuICAgICAgY29uc3QgZGF0YXYyID0gQ29udmVydGVyLlRva2VuTWV0YWRhdGEuaW50b0luZnJhKFxuICAgICAgICBpbnB1dCxcbiAgICAgICAgdXJpLFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcbiAgICAgIGRlYnVnTG9nKCcjIHVwbG9hZCBjb250ZW50IHVybDogJywgdXJpKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgdG90YWxBbW91bnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RzLnB1c2goXG4gICAgICAgICAgY3JlYXRlRnJlZXplQXV0aG9yaXR5KFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5NaW50KFxuICAgICAgICBpbnN0cyxcbiAgICAgICAgW293bmVyLnRvS2V5cGFpcigpLCBtaW50LnRvS2V5cGFpcigpXSxcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIG1pbnQucHVia2V5LFxuICAgICAgKTtcbiAgICB9KTtcbiAgfTtcbn1cbiIsICJpbXBvcnQgeyBSZXN1bHQsIFRyeSB9IGZyb20gJ34vc2hhcmVkJztcbmltcG9ydCB7IFRyYW5zYWN0aW9uQnVpbGRlciB9IGZyb20gJ34vdHJhbnNhY3Rpb24tYnVpbGRlcic7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgeyBBY2NvdW50IH0gZnJvbSAnfi9hY2NvdW50JztcbmltcG9ydCB7XG4gIGNyZWF0ZVRo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AgICAgICBjcmVhdGVNZXRhZGF0YUFjY291bnRBcmdzVjM6IHtcbiAgICAgICAgICAgIGRhdGE6IG5mdE1ldGFkYXRhLFxuICAgICAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgICAgICAgY29sbGVjdGlvbkRldGFpbHM6IG51bGwsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWFzdGVyRWRpdGlvblYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBlZGl0aW9uOiBtYXN0ZXJFZGl0aW9uUHVia2V5LFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgbWV0YWRhdGE6IHRva2VuTWV0YWRhdGFQdWJrZXksXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNYXN0ZXJFZGl0aW9uQXJnczoge1xuICAgICAgICAgICAgbWF4U3VwcGx5OiAwLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG4gICAgcmV0dXJuIGluc3RydWN0aW9ucztcbiAgfTtcblxuICAvKipcbiAgICogVXBsb2FkIGNvbnRlbnQgYW5kIE5GVCBtaW50XG4gICAqXG4gICAqIEBwYXJhbSB7U2VjcmV0fSBvd25lciAgICAgICAgIC8vIG93bmVyJ3MgU2VjcmV0XG4gICAqIEBwYXJhbSB7SW5wdXROZnRNZXRhZGF0YX0gaW5wdXRcbiAgICoge1xuICAgKiAgIG5hbWU6IHN0cmluZyAgICAgICAgICAgICAgIC8vIG5mdCBjb250ZW50IG5hbWVcbiAgICogICBzeW1ib2w6IHN0cmluZyAgICAgICAgIC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W5lZCA/IHRydWUgOiBpbnB1dC5pc011dGFibGU7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGlucHV0OiAnLCBpbnB1dCk7XG4gICAgICBkZWJ1Z0xvZygnIyBkYXRhdjI6ICcsIGRhdGF2Mik7XG5cbiAgICAgIGNvbnN0IG1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG5cbiAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGF3YWl0IGNyZWF0ZU1pbnQoXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICAvLyBjb2xsZWN0aW9uIC0tLVxuICAgICAgaWYgKGlucHV0LmNvbGxlY3Rpb24pIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlVmVyaWZ5U2l6ZWRDb2xsZWN0aW9uKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgaW5wdXQuY29sbGVjdGlvbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAg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mik7XG5cbiAgICAgIGNvbnN0IG1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG4gICAgICBjb25zdCBpbnN0cyA9IGF3YWl0IE1pbnQuY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY2tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChvcHRpb25zLmZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cy5wdXNoKFxuICAgICAgICAgIE1pbnQuY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNrZXksXG4gICAgICAgICAgICBvcHRpb25zLmZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGJsb2NraGFzaE9iaiA9IGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldExhdGVzdEJsb2NraGFzaCgpO1xuICAgICAgY29uc3QgdHggPSBuZXcgVHJhbnNhY3Rpb24oe1xuICAgICAgICBsYXN0VmFsaWRCbG9ja0hlaWdodDogYmxvY2toYXNoT2JqLmxhc3RWYWxpZEJsb2NrSGVpZ2h0LFxuICAgICAgICBibG9ja2hhc2g6IGJsb2NraGFzaE9iai5ibG9ja2hhc2gsXG4gICAgICAgIGZlZVBheWVyOiBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgfSk7XG5cbiAgICAgIGluc3RzLmZvckVhY2goKGluc3QpID0+IHR4LmFkZChpbnN0KSk7XG4gICAgICB0eC5yZWNlbnRCbG9ja2hhc2ggPSBibG9ja2hhc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6ICcsIGlucHV0KTtcbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgY29sbGVjdGlvbk1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG4gICAgICBjb25zdCBjb2xsZWN0aW9uTWV0YWRhdGFBY2NvdW50ID0gQWNjb3VudC5QZGEuZ2V0TWV0YWRhdGEoXG4gICAgICAgIGNvbGxlY3Rpb25NaW50LnB1YmtleSxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGF3YWl0IE1pbnQuY3JlYXRlTWludChcbiAgICAgICAgY29sbGVjdGlvbk1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgTWludC5jcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBjb2xsZWN0aW9ucyA9IHtcbiAgICAgICAgY29sbGVjdGlvbk1ldGFkYXRhOiBjb2xsZWN0aW9uTWV0YWRhdGFBY2NvdW50LFxuICAgICAgICBjb2xsZWN0aW9uQXV0aG9yaXR5OiBvd25lci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGNvbGxlY3Rpb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lbkFkZHJlc3NTeW5jIiwgIlJlZ3VsYXJOZnQiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmVndWxhck5mdCIsICJTcGxUb2tlbiIsICJSZWd1bGFyTmZ0IiwgIkNvbXByZXNzZWROZnQiLCAiUmVndWxhck5mdCIsICJDb21wcmVzc2VkTmZ0Il0KfQo= \ No newline at end of file diff --git a/packages/suite-compressed-nft/src/delegate.ts b/packages/suite-compressed-nft/src/delegate.ts index 2814d5b9a..ecdb7bd8d 100644 --- a/packages/suite-compressed-nft/src/delegate.ts +++ b/packages/suite-compressed-nft/src/delegate.ts @@ -78,22 +78,22 @@ export namespace CompressedNft { /** * Set delegate * - * @param {Pubkey} assetId - * @param {Secret} signer // new delegate or previous delegate signer + * @param {Pubkey} mint // target mint + * @param {Secret} owner // new delegate or previous delegate signer * @param {Partial} options * @return Promise> */ export const setDelegate = async ( - assetId: Pubkey, - signer: Secret, + mint: Pubkey, + owner: Secret, options: Partial = {}, ): Promise> => { return Try(async () => { const newDelegate = options.delegate ? options.delegate.toPublicKey() : null; - const inst = await createDeleagate(assetId.toPublicKey(), newDelegate); - return new TransactionBuilder.Common([inst], [signer.toKeypair()]); + const inst = await createDeleagate(mint.toPublicKey(), newDelegate); + return new TransactionBuilder.Common([inst], [owner.toKeypair()]); }); }; } diff --git a/packages/suite-compressed-nft/src/gas-less-delegate.ts b/packages/suite-compressed-nft/src/gas-less-delegate.ts index 54c0384f9..995f7f1ab 100644 --- a/packages/suite-compressed-nft/src/gas-less-delegate.ts +++ b/packages/suite-compressed-nft/src/gas-less-delegate.ts @@ -9,19 +9,19 @@ import { PartialSignStructure } from '~/types/transaction-builder'; export namespace CompressedNft { /** * Create delegate with gas-less - * @param {Pubkey} assetId - * @param {Secret} assetIdOwner + * @param {Pubkey} mint + * @param {Secret} owner * @param {Pubkey} newDelegate * @return {Promise>} */ export const gasLessDelegate = async ( - assetId: Pubkey, - assetIdOwner: Secret, + mint: Pubkey, + owner: Secret, newDelegate: Pubkey, ): Promise> => { return Try(async () => { const inst = await Delegate.createDeleagate( - assetId.toPublicKey(), + mint.toPublicKey(), newDelegate.toPublicKey(), ); @@ -32,7 +32,7 @@ export namespace CompressedNft { feePayer: newDelegate.toPublicKey(), }); tx.add(inst); - tx.partialSign(assetIdOwner.toKeypair()); + tx.partialSign(owner.toKeypair()); tx.recentBlockhash = blockhashObj.blockhash; return new TransactionBuilder.PartialSign( diff --git a/packages/suite-compressed-nft/src/gas-less-transfer.ts b/packages/suite-compressed-nft/src/gas-less-transfer.ts index 730a77cd2..d3fda1726 100644 --- a/packages/suite-compressed-nft/src/gas-less-transfer.ts +++ b/packages/suite-compressed-nft/src/gas-less-transfer.ts @@ -1,4 +1,4 @@ -import { Result, Try } from '~/shared'; +import { Account, Result, Try } from '~/shared'; import { Node } from '~/node'; import { Pubkey, Secret } from '~/types/account'; import { TransactionBuilder } from '~/transaction-builder'; @@ -11,20 +11,18 @@ export namespace CompressedNft { /** * Transfer with gas-less * @param {Pubkey} mint - * @param {Pubkey} owner - * @param {Secret} signer + * @param {Secret} owner * @param {Pubkey} dest * @param {Pubkey} feePayer * @returns {Promise>} */ export const gasLessTransfer = async ( mint: Pubkey, - owner: Pubkey, - signer: Secret, + owner: Secret, dest: Pubkey, feePayer: Pubkey, ): Promise[]> => { - const delegate = await Delegate.gasLessDelegate(mint, signer, feePayer); + const delegate = await Delegate.gasLessDelegate(mint, owner, feePayer); delegate.unwrap().canSubmit = true; const transfer = await Try(async () => { @@ -35,7 +33,14 @@ export namespace CompressedNft { feePayer: feePayer.toPublicKey(), }); - inst.add(await Transfer.createTransfer(mint, owner, dest, feePayer)); + inst.add( + await Transfer.createTransfer( + mint, + new Account.Keypair({ secret: owner }).pubkey, + dest, + feePayer, + ), + ); inst.recentBlockhash = blockhashObj.blockhash; return new TransactionBuilder.PartialSign( diff --git a/packages/suite-compressed-nft/src/mint-collection.ts b/packages/suite-compressed-nft/src/mint-collection.ts index fb067a4b5..12ec14fc8 100644 --- a/packages/suite-compressed-nft/src/mint-collection.ts +++ b/packages/suite-compressed-nft/src/mint-collection.ts @@ -1,5 +1,5 @@ import { Result } from '~/shared'; -import { Pubkey, Secret } from '~/types/account'; +import { Secret } from '~/types/account'; import { RegularNft } from '~/suite-regular-nft'; import { InputNftMetadata } from '~/types/regular-nft'; import { MintCollectionOptions } from '~/types/compressed-nft'; @@ -9,21 +9,19 @@ import { MintStructure } from '~/types/transaction-builder'; * create a collection * This function needs only 1 call * - * @param {Pubkey} owner - * @param {Secret} signer + * @param {Secret} owner * @param {InputNftMetadata} input * @param {MintCollectionOptions} options * @returns Promise> */ export namespace CompressedNft { export const mintCollection = ( - owner: Pubkey, - signer: Secret, + owner: Secret, input: InputNftMetadata, options: Partial = {}, ): Promise> => { const { feePayer, freezeAuthority } = options; - return RegularNft.mintCollection(owner, signer, input, { + return RegularNft.mintCollection(owner, input, { feePayer, freezeAuthority, }); diff --git a/packages/suite-compressed-nft/src/mint.ts b/packages/suite-compressed-nft/src/mint.ts index bb34d0052..e3a4125e9 100644 --- a/packages/suite-compressed-nft/src/mint.ts +++ b/packages/suite-compressed-nft/src/mint.ts @@ -93,8 +93,7 @@ export namespace CompressedNft { /** * Upload content and Compressed NFT mint * - * @param {Pubkey} owner // first minted owner - * @param {Secret} signer // owner's Secret + * @param {Secret} owner // owner's Secret * @param {InputNftMetadata} input * { * name: string // nft content name @@ -116,8 +115,7 @@ export namespace CompressedNft { * @return Promise> */ export const mint = async ( - owner: Pubkey, - signer: Secret, + owner: Secret, input: InputNftMetadata, treeOwner: Pubkey, collectionMint: Pubkey, @@ -129,9 +127,10 @@ export namespace CompressedNft { throw valid.error; } const { feePayer, receiver, delegate } = options; - const payer = feePayer ? feePayer : signer; + const payer = feePayer ? feePayer : owner; const storageType = input.storageType || DEFAULT_STORAGE_TYPE; - const leafOwner = receiver ? receiver : owner; + const ownerPublicKey = owner.toKeypair().publicKey; + const leafOwner = receiver ? receiver.toPublicKey() : ownerPublicKey; const leafDelegate = delegate ? delegate : new Account.Keypair({ secret: payer! }).pubkey; @@ -224,11 +223,11 @@ export namespace CompressedNft { { merkleTree: treeOwner.toPublicKey(), treeAuthority, - treeDelegate: owner.toPublicKey(), + treeDelegate: ownerPublicKey, payer: payer.toKeypair().publicKey, - leafOwner: leafOwner.toPublicKey(), // receiver + leafOwner: leafOwner, // receiver leafDelegate: leafDelegate.toPublicKey(), - collectionAuthority: owner.toPublicKey(), + collectionAuthority: ownerPublicKey, collectionMint: collectionMint.toPublicKey(), collectionMetadata, editionAccount: collectionMasterEditionAccount, @@ -259,7 +258,7 @@ export namespace CompressedNft { return new TransactionBuilder.Mint( instructions, - [signer.toKeypair()], + [owner.toKeypair()], payer.toKeypair(), new Space.Space(treeOwner), ); diff --git a/packages/suite-compressed-nft/src/space.ts b/packages/suite-compressed-nft/src/space.ts index f4a96a3cc..ca1e8ca7a 100644 --- a/packages/suite-compressed-nft/src/space.ts +++ b/packages/suite-compressed-nft/src/space.ts @@ -37,8 +37,7 @@ export namespace CompressedNft { * create a new markle tree * This function needs only 1 call * - * @param {Pubkey} owner - * @param {Secret} signer + * @param {Secret} owner * @param {number} maxDepth * @param {number} maxBufferSize * @param {number} canopyDepth @@ -46,15 +45,14 @@ export namespace CompressedNft { * @return Promise> */ export const initSpace = ( - owner: Pubkey, - signer: Secret, + owner: Secret, maxDepth: number, maxBufferSize: number, canopyDepth: number, options: Partial = {}, ): Promise> => { return Try(async () => { - const payer = options.feePayer ? options.feePayer : signer; + const payer = options.feePayer ? options.feePayer : owner; const treeOwner = Account.Keypair.create(); const space = getConcurrentMerkleTreeAccountSize( maxDepth, @@ -90,7 +88,7 @@ export namespace CompressedNft { { merkleTree: treeOwner.toKeypair().publicKey, treeAuthority, - treeCreator: owner.toPublicKey(), + treeCreator: owner.toKeypair().publicKey, payer: payer.toKeypair().publicKey, logWrapper: SPL_NOOP_PROGRAM_ID, compressionProgram: SPL_ACCOUNT_COMPRESSION_PROGRAM_ID, @@ -106,7 +104,7 @@ export namespace CompressedNft { return new TransactionBuilder.Mint( instructions, - [treeOwner.toKeypair(), signer.toKeypair()], + [treeOwner.toKeypair(), owner.toKeypair()], payer.toKeypair(), treeOwner.pubkey, ); @@ -117,29 +115,20 @@ export namespace CompressedNft { * create a new nft space * This function needs only 1 call * - * @param {Pubkey} owner - * @param {Secret} signer + * @param {Secret} owner * @param {number} spaceSize * @param {Partial} options * * @return Promise> */ export const createSpace = async ( - owner: Pubkey, - signer: Secret, + owner: Secret, spaceSize: number, options: Partial = {}, ): Promise> => { const { maxDepth, maxBufferSize, canopyDepth } = calculateSpaceNumberToDepth(spaceSize); - return initSpace( - owner, - signer, - maxDepth, - maxBufferSize, - canopyDepth, - options, - ); + return initSpace(owner, maxDepth, maxBufferSize, canopyDepth, options); }; /** diff --git a/packages/suite-compressed-nft/src/transfer.ts b/packages/suite-compressed-nft/src/transfer.ts index 56db4aacb..4893606ce 100644 --- a/packages/suite-compressed-nft/src/transfer.ts +++ b/packages/suite-compressed-nft/src/transfer.ts @@ -96,21 +96,21 @@ export namespace CompressedNft { /** * transfer nft * - * @param {Pubkey} assetId - * @param {Pubkey} assetIdOwner + * @param {Pubkey} mint + * @param {Pubkey} owner * @param {Pubkey} dest - * @param {Secret[]} signers + * @param {Secret[]} ownerOrMultisig * @return Promise> */ export const transfer = async ( - assetId: Pubkey, - assetIdOwner: Pubkey, + mint: Pubkey, + owner: Pubkey, dest: Pubkey, - signers: Secret[], + ownerOrMultisig: Secret[], ): Promise> => { return Try(async () => { - const keypairs = signers.map((s) => s.toKeypair()); - const inst = await createTransfer(assetId, assetIdOwner, dest); + const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); + const inst = await createTransfer(mint, owner, dest); return new TransactionBuilder.Common([inst], keypairs); }); }; diff --git a/packages/suite-compressed-nft/test/gas-less-transfer.test.ts b/packages/suite-compressed-nft/test/gas-less-transfer.test.ts index 18ee6e41b..a86a67843 100644 --- a/packages/suite-compressed-nft/test/gas-less-transfer.test.ts +++ b/packages/suite-compressed-nft/test/gas-less-transfer.test.ts @@ -28,7 +28,6 @@ test.before(async (t) => { test('Gas-Less Transfer nft', async (t) => { const serialized = await CompressedNft.gasLessTransfer( mint, - source.pubkey, source.secret, dest.pubkey, feePayer.pubkey, diff --git a/packages/suite-compressed-nft/test/mint-collection.test.ts b/packages/suite-compressed-nft/test/mint-collection.test.ts index 7094d08d1..b57255b19 100644 --- a/packages/suite-compressed-nft/test/mint-collection.test.ts +++ b/packages/suite-compressed-nft/test/mint-collection.test.ts @@ -13,7 +13,6 @@ test.before(async () => { test('Create collection', async (t) => { const inst = await CompressedNft.mintCollection( - source.pubkey, source.secret, { name: 'CollectionNFT', diff --git a/packages/suite-compressed-nft/test/mint.test.ts b/packages/suite-compressed-nft/test/mint.test.ts index 30eb73597..01c5765bc 100644 --- a/packages/suite-compressed-nft/test/mint.test.ts +++ b/packages/suite-compressed-nft/test/mint.test.ts @@ -24,7 +24,6 @@ test.before(async () => { test('[nftStorage] mint nft, already uploaed image', async (t) => { const asset = RandomAsset.get(); const inst = await CompressedNft.mint( - source.pubkey, source.secret, { uri: 'https://ipfs.io/ipfs/bafkreibh6mv6zqvg2wopmtx3k4smavcfx55ob2pciuoob2z44acgtem754', @@ -50,7 +49,6 @@ test('[nftStorage] mint nft, already uploaed image', async (t) => { test('[Arweave] mint nft', async (t) => { const asset = RandomAsset.get(); const inst = await CompressedNft.mint( - source.pubkey, source.secret, { filePath: asset.filePath as string, @@ -79,7 +77,6 @@ test('[Arweave] mint nft', async (t) => { test('[Nft Storage] mint nft with fee payer', async (t) => { const asset = RandomAsset.get(); const inst = await CompressedNft.mint( - source.pubkey, source.secret, { filePath: asset.filePath, @@ -151,7 +148,6 @@ test('[Nft Storage] mint nft with many optional datas, verified collection', asy }; const inst = await CompressedNft.mint( - source.pubkey, source.secret, { filePath: asset.filePath as string, @@ -191,7 +187,6 @@ test('[Nft Storage] mint nft with many optional datas, verified collection', asy test('[Error]Raise validation error when upload meta data', async (t) => { const inst = await CompressedNft.mint( - source.pubkey, source.secret, { filePath: 'not found', diff --git a/packages/suite-compressed-nft/test/space.test.ts b/packages/suite-compressed-nft/test/space.test.ts index 002a64670..2d6f93338 100644 --- a/packages/suite-compressed-nft/test/space.test.ts +++ b/packages/suite-compressed-nft/test/space.test.ts @@ -22,14 +22,9 @@ test('Get asset id', async (t) => { }); test('Create merkle tree', async (t) => { - const inst = await CompressedNft.initSpace( - owner.pubkey, - owner.secret, - 3, - 8, - 3, - { feePayer: feePayer.secret }, - ); + const inst = await CompressedNft.initSpace(owner.secret, 3, 8, 3, { + feePayer: feePayer.secret, + }); (await inst.submit()).match( (ok) => { t.log('# sig: ', ok); @@ -44,7 +39,7 @@ test('Create merkle tree', async (t) => { }); test('Create merkle tree by mint total number', async (t) => { - const inst = await CompressedNft.createSpace(owner.pubkey, owner.secret, 8, { + const inst = await CompressedNft.createSpace(owner.secret, 8, { feePayer: feePayer.secret, }); (await inst.submit()).match( diff --git a/packages/suite-memo/dist/index.d.mts b/packages/suite-memo/dist/index.d.mts index 5e0f75128..fd2bdd5a7 100644 --- a/packages/suite-memo/dist/index.d.mts +++ b/packages/suite-memo/dist/index.d.mts @@ -677,7 +677,7 @@ declare const Memo: { findByOwner: (target: Pubkey, onOk: OnOk, onErr: OnErr, options?: Partial) => Promise; decode: (encoded: string) => string; encode: (data: string) => Buffer; - create: (data: string, owner: Pubkey, signer: Secret, options?: Partial) => Result; + create: (data: string, owner: Secret, options?: Partial) => Result; }; export { Account, Explorer, ExplorerOptions, FilterOptions, FilterType, KeypairAccount, Memo, MintTo, MintToChecked, ModuleName, Node, OwnerInfo, PostTokenAccount, Pubkey, Secret, Transfer, TransferChecked, Try, Validator, ValidatorError, WithMemo, bufferToArray, convertTimestampToDateTime, debugLog, isBrowser, isNode, isPromise, overwriteObject, sleep, unixTimestamp }; diff --git a/packages/suite-memo/dist/index.d.ts b/packages/suite-memo/dist/index.d.ts index 5e0f75128..fd2bdd5a7 100644 --- a/packages/suite-memo/dist/index.d.ts +++ b/packages/suite-memo/dist/index.d.ts @@ -677,7 +677,7 @@ declare const Memo: { findByOwner: (target: Pubkey, onOk: OnOk, onErr: OnErr, options?: Partial) => Promise; decode: (encoded: string) => string; encode: (data: string) => Buffer; - create: (data: string, owner: Pubkey, signer: Secret, options?: Partial) => Result; + create: (data: string, owner: Secret, options?: Partial) => Result; }; export { Account, Explorer, ExplorerOptions, FilterOptions, FilterType, KeypairAccount, Memo, MintTo, MintToChecked, ModuleName, Node, OwnerInfo, PostTokenAccount, Pubkey, Secret, Transfer, TransferChecked, Try, Validator, ValidatorError, WithMemo, bufferToArray, convertTimestampToDateTime, debugLog, isBrowser, isNode, isPromise, overwriteObject, sleep, unixTimestamp }; diff --git a/packages/suite-memo/dist/index.js b/packages/suite-memo/dist/index.js index 206aa0060..f95555eed 100644 --- a/packages/suite-memo/dist/index.js +++ b/packages/suite-memo/dist/index.js @@ -1625,12 +1625,12 @@ var Memo; ((Memo4) => { Memo4.decode = (encoded) => import_bs583.default.decode(encoded).toString(); Memo4.encode = (data) => Buffer.from(data); - Memo4.create = (data, owner, signer, options = {}) => { + Memo4.create = (data, owner, options = {}) => { return Try(() => { const feePayer = options.feePayer; - const key = owner.toPublicKey() ? [ + const key = owner.toKeypair().publicKey ? [ { - pubkey: owner.toPublicKey(), + pubkey: owner.toKeypair().publicKey, isSigner: true, isWritable: true } @@ -1640,10 +1640,10 @@ var Memo; data: (0, Memo4.encode)(data), keys: key }); - const payer = feePayer || signer; + const payer = feePayer || owner; return new TransactionBuilder.Common( [instruction], - [signer.toKeypair()], + [owner.toKeypair()], payer.toKeypair() ); }); @@ -1851,4 +1851,4 @@ var Memo3 = { ...Memo, ...Memo2 }; sleep, unixTimestamp }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9jcmVhdGUudHMiLCAiLi4vLi4vdHJhbnN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CdWlsZGVyLkNvbW1vbikge1xuICAgICAgICAgICAgKGF3YWl0IGluc3Quc3VibWl0KCkpLm1hcChcbiAgICAgICAgICAgICAgYXN5bmMgKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZWF0ZSB0b2tlbiBhY2NvdW50OiBgLCBlKTtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyBtaW50OiAke21pbnR9LCBvd25lcjogJHtvd25lcn0sIGZlZVBheWVyOiAke2ZlZVBheWVyfWApO1xuICAgICAgICB9XG4gICAgICAgIGF3YWl0IHNsZWVwKFJFVFJZX1NMRUVQX1RJTUUpO1xuICAgICAgICBjb3VudGVyKys7XG4gICAgICB9XG4gICAgICB0aHJvdyBFcnJvcihgcmV0cnkgYWN0aW9uIGlzIG92ZXIgbGltaXQgJHtSRVRSWV9PVkVSX0xJTUlUfWApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBbTWFpbiBsb2dpY11HZXQgQXNzb2NpYXRlZCB0b2tlbiBBY2NvdW50LlxuICAgICAqIGlmIG5vdCBjcmVhdGVkLCBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxu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XRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0LFxuICAgICAgICB9O1xu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1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9XG4gICAgICAgICAgJ0NhdWdodCBpbiB0aGUgdmFsaWRhdGlvbiBlcnJvcnMuIHNlZSBpbmZvcm1hdGlvbiBlLmc6IGVycjxWYWxpZGF0b3JFcnJvcj4uZGV0YWlscyc7XG4gICAgICAgIHRocm93IG5ldyBWYWxpZGF0b3JFcnJvcihtZXNzYWdlLCByZXN1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ZXRhLnRyYW5zYWN0aW9uLm1lc3NhZ2UuaW5zdHJ1Y3Rpb25zLmZvckVhY2goKGluc3RydWN0aW9uKSA9PiB7XG4gICAgICAgIGlmIChpc1BhcnNlZEluc3RydWN0aW9uKGluc3RydWN0aW9uKSkge1xuICAgICAgICAgIHN3aXRjaCAoZmlsdGVyVHlwZSkge1xuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk1lbW86IHtcbiAgICAgICAgICAgICAgaWYgKEZpbHRlck9wdGlvbnMuTWVtby5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pKSB7XG4gICAgICAgICAgICAgICAgbGV0IGluc3RydWN0aW9uVHJhbnNmZXI7XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCAgdHJhbnNmZXIgdHJhbnNhY3Rpb24gZm9yIHJlbGF0aW9uYWwgbWVtb1xuICAgICAgICAgICAgICAgIHR4TWV0YS50cmFuc2FjdGlvbi5tZXNzYWdlLmluc3RydWN0aW9ucy5mb3JFYWNoKFxuICAgICAgICAgICAgICAgICAgKGluc3RydWN0aW9uKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICBpc1BhcnNlZEluc3RydWN0aW9uKGluc3RydWN0aW9uKSAmJlxuICAgICAgICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIucHJvZ3JhbS5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnByb2dyYW0sXG4gICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyID0gaW5zdHJ1Y3Rpb247XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgIC8vIHNwbC10b2tlbiBvciBzeXN0ZW1cbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyICYmXG4gICAgICAgICAgICAgICAgICBtb2R1bGVOYW1lICE9PSBpbnN0cnVjdGlvblRyYW5zZmVyWydwcm9ncmFtJ11cbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgIGRlYnVnTG9nKFxuICAgICAgICAgICAgICAgICAgICAnIyBGaWx0ZXJUeXBlLk1lbW8gYnJlYWsgaW5zdHJ1Y3Rpb246ICcsXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gZmV0Y2ggbWVtbyBvbmx5IHRyYW5zYWN0aW9uXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5Pbmx5TWVtbzoge1xuICAgICAgICAgICAgICBpZiAoRmlsdGVyT3B0aW9ucy5NZW1vLnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkpIHtcbiAgICAgICAgICAgICAgICBsZXQgaW5zdHJ1Y3Rpb25UcmFuc2ZlcjtcblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuTWludDoge1xuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkgJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NaW50LmludG9Vc2VyU2lkZShpbnN0cnVjdGlvbiwgdHhNZXRhKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5UcmFuc2ZlcjpcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgPT09IGluc3RydWN0aW9uLnByb2dyYW0gJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGlmIChpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSA9PT0gJ3RyYW5zZmVyQ2hlY2tlZCcpIHtcbiAgICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuVHJhbnNmZXJDaGVja2VkLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuVHJhbnNmZXIuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgcmV0dXJuIGhpc3Rvcnk7XG4gICAgfTtcbn1cbiIsICJpbXBvcnQgeyBQdWJrZXkgfSBmcm9tICd+L3R5cGVzL2FjY291bnQnO1xuaW1wb3J0IHsgRmluZE9wdGlvbnMsIEhpc3RvcnkgfSBmcm9tICd+L3R5cGVzL2hpc3RvcnknO1xuaW1wb3J0IHsgT25FcnIsIE9uT2sgfSBmcm9tICd+L3R5cGVzL3NoYXJlZCc7XG5pbXBvcnQgeyBGaWx0ZXJUeXBlLCBNb2R1bGVOYW1lIH0gZnJvbSAnfi90eXBlcy90cmFuc2FjdGlvbi1maWx0ZXInO1xuaW1wb3J0IHsgU2lnbmF0dXJlcywgVHJhbnNhY3Rpb25GaWx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cbiAgICAgICAgICAgICAgYXN5bmMgKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZWF0ZSB0b2tlbiBhY2NvdW50OiBgLCBlKTtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyBtaW50OiAke21pbnR9LCBvd25lcjogJHtvd25lcn0sIGZlZVBheWVyOiAke2ZlZVBheWVyfWApO1xuICAgICAgICB9XG4gICAgICAgIGF3YWl0IHNsZWVwKFJFVFJZX1NMRUVQX1RJTUUpO1xuICAgICAgICBjb3VudGVyKys7XG4gICAgICB9XG4gICAgICB0aHJvdyBFcnJvcihgcmV0cnkgYWN0aW9uIGlzIG92ZXIgbGltaXQgJHtSRVRSWV9PVkVSX0xJTUlUfWApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBbTWFpbiBsb2dpY11HZXQgQXNzb2NpYXRlZCB0b2tlbiBBY2NvdW50LlxuICAgICAqIGlmIG5vdCBjcmVhdGVkLCBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBmZWV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uICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0LFxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQgeyBLZXlwYWlyIGFzIE9yaWdp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ICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9XG4gICAgICAgICAgJ0NhdWdodCBpbiB0aGUgdmFsaWRhdGlvbiBlcnJvcnMuIHNlZSBpbmZvcm1hdGlvbiBlLmc6IGVycjxWYWxpZGF0b3JFcnJvcj4uZGV0YWlscyc7XG4gICAgICAgIHRocm93IG5ldyBWYWxpZGF0b3JFcnJvcihtZXNzYWdlLCByZXN1bHRzKTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBNZXNzYWdlLlNVQ0NFU1M7XG4gICAgfSk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ydWN0aW9uKSA9PiB7XG4gICAgICAgIGlmIChpc1BhcnNlZEluc3RydWN0aW9uKGluc3RydWN0aW9uKSkge1xuICAgICAgICAgIHN3aXRjaCAoZmlsdGVyVHlwZSkge1xuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk1lbW86IHtcbiAgICAgICAgICAgICAgaWYgKEZpbHRlck9wdGlvbnMuTWVtby5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pKSB7XG4gICAgICAgICAgICAgICAgbGV0IGluc3RydWN0aW9uVHJhbnNmZXI7XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCAgdHJhbnNmZXIgdHJhbnNhY3Rpb24gZm9yIHJlbGF0aW9uYWwgbWVtb1xuICAgICAgICAgICAgICAgIHR4TWV0YS50cmFuc2FjdGlvbi5tZXNzYWdlLmluc3RydWN0aW9ucy5mb3JFYWNoKFxuICAgICAgICAgICAgICAgICAgKGluc3RydWN0aW9uKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICBpc1BhcnNlZEluc3RydWN0aW9uKGluc3RydWN0aW9uKSAmJlxuICAgICAgICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIucHJvZ3JhbS5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnByb2dyYW0sXG4gICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyID0gaW5zdHJ1Y3Rpb247XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgIC8vIHNwbC10b2tlbiBvciBzeXN0ZW1cbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyICYmXG4gICAgICAgICAgICAgICAgICBtb2R1bGVOYW1lICE9PSBpbnN0cnVjdGlvblRyYW5zZmVyWydwcm9ncmFtJ11cbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgIGRlYnVnTG9nKFxuICAgICAgICAgICAgICAgICAgICAnIyBGaWx0ZXJUeXBlLk1lbW8gYnJlYWsgaW5zdHJ1Y3Rpb246ICcsXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gZmV0Y2ggbWVtbyBvbmx5IHRyYW5zYWN0aW9uXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5Pbmx5TWVtbzoge1xuICAgICAgICAgICAgICBpZiAoRmlsdGVyT3B0aW9ucy5NZW1vLnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkpIHtcbiAgICAgICAgICAgICAgICBsZXQgaW5zdHJ1Y3Rpb25UcmFuc2ZlcjtcblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuTWludDoge1xuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkgJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NaW50LmludG9Vc2VyU2lkZShpbnN0cnVjdGlvbiwgdHhNZXRhKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5UcmFuc2ZlcjpcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgPT09IGluc3RydWN0aW9uLnByb2dyYW0gJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICA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WVzc2FnZSIsICJDb252ZXJ0ZXIiLCAiRmlsdGVyVHlwZSIsICJNb2R1bGVOYW1lIiwgImltcG9ydF93ZWIzIiwgIk5vZGUiLCAiaW1wb3J0X3dlYjMiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIkNvbW1vbiIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X3dlYjMiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImltcG9ydF93ZWIzIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImltcG9ydF9iczU4IiwgIk1lbW8iLCAiYnMiLCAiU2lnbmF0dXJlcyIsICJUcmFuc2FjdGlvbkZpbHRlciIsICJpbnN0cnVjdGlvbiIsICJDb252ZXJ0ZXIiLCAiTWVtbyIsICJNZW1vIl0KfQo= \ No newline at end of file diff --git a/packages/suite-memo/dist/index.mjs b/packages/suite-memo/dist/index.mjs index 0a48424d8..b4ce7d03a 100644 --- a/packages/suite-memo/dist/index.mjs +++ b/packages/suite-memo/dist/index.mjs @@ -1593,12 +1593,12 @@ var Memo; ((Memo4) => { Memo4.decode = (encoded) => bs3.decode(encoded).toString(); Memo4.encode = (data) => Buffer.from(data); - Memo4.create = (data, owner, signer, options = {}) => { + Memo4.create = (data, owner, options = {}) => { return Try(() => { const feePayer = options.feePayer; - const key = owner.toPublicKey() ? [ + const key = owner.toKeypair().publicKey ? [ { - pubkey: owner.toPublicKey(), + pubkey: owner.toKeypair().publicKey, isSigner: true, isWritable: true } @@ -1608,10 +1608,10 @@ var Memo; data: (0, Memo4.encode)(data), keys: key }); - const payer = feePayer || signer; + const payer = feePayer || owner; return new TransactionBuilder.Common( [instruction], - [signer.toKeypair()], + [owner.toKeypair()], payer.toKeypair() ); }); @@ -1818,4 +1818,4 @@ export { sleep, unixTimestamp }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2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iAgfTtcblxuICBleHBvcnQgY29uc3Qgc3dpdGNoQnVuZGxyID0gKGVudjogc3RyaW5nKTogc3RyaW5nID0+IHtcbiAgICBzd2l0Y2ggKGVudikge1xuICAgICAgY2FzZSBDb25zdGFudHMuQ2x1c3Rlci5wcmQ6IHtcbiAgICAgICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5CdW5kbHJVcmwucHJkLnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIHJldHVybiBDb25zdGFudHMuQnVuZGxyVXJsLmRldjtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IHN3aXRjaERhc0FwaSA9IChlbnY6IHN0cmluZyk6IHN0cmluZyA9PiB7XG4gICAgc3dpdGNoIChlbnYpIHtcbiAgICAgIGNhc2UgQ29uc3RhbnRzLkNsdXN0ZXIucHJkOiB7XG4gICAgICAgIGlmIChkYXNBcGlVcmwubGVuZ3RoIDwgMSkge1xuICAgICAgICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuREFTX0FQSV9VUkwpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuQnVuZGxyVXJsLnByZC5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBjb25zdCB1cmxzID0gQ29uc3RhbnRzLkRhc0FwaVVybC5kZXYuc3BsaXQoJywnKTtcbiAgICAgICAgY29uc3QgaW5kZXggPSBEYXRlLm5vdygpICUgdXJscy5sZW5ndGg7X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3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2coYCMgbWludDogJHttaW50fSwgb3duZXI6ICR7b3duZXJ9LCBmZWVQYXllcjogJHtmZWVQYXllcn1gKTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBzbGVlcChSRVRSWV9TTEVFUF9USU1FKTtcbiAgICAgICAgY291bnRlcisrO1xuICAgICAgfVxuICAgICAgdGhyb3cgRXJyb3IoYHJldHJ5IGFjdGlvbiBpcyBvdmVyIGxpbWl0ICR7UkVUUllfT1ZFUl9MSU1JVH1gKTtcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogW01haW4gbG9naWNdR2V0IEFzc29jaWF0ZWQgdG9rZW4gQWNjb3VudC5cbiAgICAgKiBpZiBub3QgY3JlYXRlZCwgY3JlYXRlIG5ldyB0b2tlbiBhY2NvdWludFxuICAgICAqXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG1pbnRcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gb3duZXJcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gZmVlUGF5ZXJcbiAgICAgKiBAcmV0dXJucyBQcm9taXNl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V0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZ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c2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gb3V0cHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1N0cmluZygpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBkYXRhLnZlcmlmaWVkLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImV4cG9ydCBuYW1lc3B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yaW5nLCBWYWxpZGF0b3JFcnJvcj4gPT4ge1xuICAgIHJldHVybiBUcnkoKCkgPT4ge1xuICAgICAgY29uc3Qga2V5cyA9IE9iamVjdC5rZXlzKG1ldGFkYXRhKTtcbiAgICAgIGNvbnN0IHJlc3VsdHM6IERldGFpbHNbXSA9IFtdO1xuICAgICAga2V5cy5tYXAoKGtleSkgPT4ge1xuICAgICAgICBsZXQgcmVzITogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+O1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKG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2UgRmlsdGVyVHlwZS5NZW1vOiB7XG4gICAgICAgICAgICAgIGlmIChGaWx0ZXJPcHRpb25zLk1lbW8ucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSkge1xuICAgICAgICAgICAgICAgIGxldCBpbnN0cnVjdGlvblRyYW5zZmVyO1xuXG4gICAgICAgICAgICAgICAgLy8gZmV0Y2ggIHRyYW5zZmVyIHRyYW5zYWN0aW9uIGZvciByZWxhdGlvbmFsIG1lbW9cbiAgICAgICAgICAgICAgICB0eE1ldGEudHJhbnNhY3Rpb24ubWVzc2FnZS5pbnN0cnVjdGlvbnMuZm9yRWFjaChcbiAgICAgICAgICAgICAgICAgIChpbnN0cnVjdGlvbikgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgaXNQYXJzZWRJbnN0cnVjdGlvbihpbnN0cnVjdGlvbikgJiZcbiAgICAgICAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLnByb2dyYW0uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wcm9ncmFtLFxuICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciA9IGluc3RydWN0aW9uO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgICAgICAvLyBzcGwtdG9rZW4gb3Igc3lzdGVtXG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciAmJlxuICAgICAgICAgICAgICAgICAgbW9kdWxlTmFtZSAhPT0gaW5zdHJ1Y3Rpb25UcmFuc2ZlclsncHJvZ3JhbSddXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICBkZWJ1Z0xvZyhcbiAgICAgICAgICAgICAgICAgICAgJyMgRmlsdGVyVHlwZS5NZW1vIGJyZWFrIGluc3RydWN0aW9uOiAnLFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIGZldGNoIG1lbW8gb25seSB0cmFuc2FjdGlvblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuT25seU1lbW86IHtcbiAgICAgICAgICAgICAgaWYgKEZpbHRlck9wdGlvbnMuTWVtby5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pKSB7XG4gICAgICAgICAgICAgICAgbGV0IGluc3RydWN0aW9uVHJhbnNmZXI7XG5cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk1pbnQ6IHtcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWludC5pbnRvVXNlclNpZGUoaW5zdHJ1Y3Rpb24sIHR4TWV0YSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuVHJhbnNmZXI6XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBtb2R1bGVOYW1lID09PSBpbnN0cnVjdGlvbi5wcm9ncmFtICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBpZiAoaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgPT09ICd0cmFuc2ZlckNoZWNrZWQnKSB7XG4gICAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLlRyYW5zZmVyQ2hlY2tlZC5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLlRyYW5zZmVyLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIHJldHVybiBoaXN0b3J5O1xuICAgIH07XG59XG4iLCAiaW1wb3J0IHsgUHVia2V5IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCB7IEZpbmRPcHRpb25zLCBIaXN0b3J5IH0gZnJvbSAnfi90eXBlcy9oaXN0b3J5JztcbmltcG9ydCB7IE9uRXJyLCBPbk9rIH0gZnJvbSAnfi90eXBlcy9zaGFyZWQnO1xuaW1wb3J0IHsgRmlsdGVyVHlwZSwgTW9kdWxlTmFtZSB9IGZyb20gJ34vdHlwZXMvdHJhbnNhY3Rpb24tZmlsdGVyJztcbmltcG9ydCB7IFNpZ25hdHVyZXMsIFRyYW5zYWN0aW9uRmlsdGVyIH0gZnJvbSAnfi90cmFuc2FjdGlvbi1maWx0ZXInO1xuXG5leHBvcnQgbmFtZXNwYWNlIE1lbW8ge1xuICBleHBvcnQgY29uc3QgZmluZEJ5T3duZXIgPSBhc3luYyAoXG4gICAgdGFyZ2V0OiBQdWJrZXksXG4gICAgb25PazogT25PazxIaXN0b3J5PixcbiAgICBvbkVycjogT25FcnIsXG4gICAgb3B0aW9uczogU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PSBhc3luYyAoXG4gICAgICBhcnI6IENvbW1vbi5Db21tb25bXSB8IE1pbnQuTWludFtdLFxuICAgICk6IFByb21pc2U8UmVzdWx0PFRyYW5zYWN0aW9uU2lnbmF0dXJlLCBFcnJvcj4+ID0+IHtcbiAgICAgIHJldHVybiBUcnkoYXN5bmMgKCkgPT4ge1xuICAgICAgICBsZXQgaSA9IDA7XG4gICAgICAgIGZvciAoY29uc3QgYSBvZiBhcnIpIHtcbiAgICAgICAgICBpZiAoIWEuaW5zdHJ1Y3Rpb25zICYmICFhLnNpZ25lcnMpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKFxuICAgICAgICAgICAgICBgb25seSBJbnN0cnVjdGlvbiBvYmplY3QgdGhhdCBjYW4gdXNlIGJhdGNoU3VibWl0KCkuXG4gICAgICAgICAgICBJbmRleDogJHtpfSwgU2V0IHZhbHVlOiAke0pTT04uc3RyaW5naWZ5KGEpfWAsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpKys7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5pbnN0cnVjdGlvbnMpO1xuICAgICAgICBjb25zdCBzaWduZXJzID0gYXJyLmZsYXRNYXAoKGEpID0+IGEuc2lnbmVycyk7XG4gICAgICAgIGNvbnN0IGZlZVBheWVycyA9IGFyci5maWx0ZXIoKGEpID0+IGEuZmVlUGF5ZXIgIT09IHVuZGVmaW5lZCk7XG4gICAgICAgIGxldCBmZWVQYXllciA9IHNpZ25lcnNbMF07XG4gICAgICAgIGlmIChmZWVQYXllcnMubGVuZ3RoID4gMCAmJiBmZWVQYXllcnNbMF0uZmVlUGF5ZXIpIHtcbiAgICAgICAgICBmZWVQYXllciA9IGZlZVBheWVyc1swXS5mZWVQYXllcjtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHRyYW5zYWN0aW9uID0gbmV3IFRyYW5zYWN0a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HMuRW5kUG9pbnRVcmwubG9jYWxob3N0O1xuICAgIH1cbiAgfTtcblxuICBleHBvcnQgY29uc3Qgc3dpdGNoQnVuZGxyID0gKGVudjogc3RyaW5nKTogc3RyaW5nID0+IHtcbiAgICBzd2l0Y2ggKGVudikge1xuICAgICAgY2FzZSBDb25zdGFudHMuQ2x1c3Rlci5wcmQ6IHtcbiAgICAgICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5CdW5kbHJVcmwucHJkLnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIHJldHVybiBDb25zdGFudHMuQnVuZGxyVXJsLmRldjtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IHN3aXRjaERhc0FwaSA9IChlbnY6IHN0cmluZyk6IHN0cmluZyA9PiB7XG4gICAgc3dpdGNoIChlbnYpIHtcbiAgICAgIGNhc2UgQ29uc3RhbnRzLkNsdXN0ZXIucHJkOiB7XG4gICAgICAgIGlmIChkYXNBcGlVcmwubGVuZ3RoIDwgMSkge1xuICAgICAgICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuREFTX0FQSV9VUkwpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuQnVuZGxyVXJsLnByZC5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBjb25zdCB1cmxzID0gQ29uc3RhbnRzLkRhc0FwaVVybC5kZXYuc3BsaXQoJywnKTtcbiAgICAgICAgY29uc3Qg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CgpKS5tYXAoXG4gICAgICAgICAgICAgIGFzeW5jIChvazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2coYCMgbWludDogJHttaW50fSwgb3duZXI6ICR7b3duZXJ9LCBmZWVQYXllcjogJHtmZWVQYXllcn1gKTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBzbGVlcChSRVRSWV9TTEVFUF9USU1FKTtcbiAgICAgICAgY291bnRlcisrO1xuICAgICAgfVxuICAgICAgdGhyb3cgRXJyb3IoYHJldHJ5IGFjdGlvbiBpcyBvdmVyIGxpbWl0ICR7UkVUUllfT1ZFUl9MSU1JVH1gKTtcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogW01haW4gbG9naWNdR2V0IEFzc29jaWF0ZWQgdG9rZW4gQWNjb3VudC5cbiAgICAgKiBpZiBub3QgY3JlYXRlZCwgY3JlYXRlIG5ldyB0b2tlbiBhY2NvdWludFxuICAgICAqXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG1pbnRcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gb3duZXJcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gZ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FJPR1JBTV9JRCxcbiAgICAgICAgKTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS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S5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gb3V0cHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1N0cmluZygpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBkYXRhLnZlcmlmaWVkLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4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uICAgIG1ldGFkYXRhOiBULFxuICApOiBSZXN1bHQ8c3RyaW5nLCBWYWxpZGF0b3JFcnJvcj4gPT4ge1xuICAgIHJldHVybiBUcnkoKCkgPT4ge1xuICAgICAgY29uc3Qga2V5cyA9IE9iamVjdC5rZXlzKG1ldGFkYXRhKTtcbiAgICAgIGNvbnN0IHJlc3VsdHM6IERldGFpbHNbXSA9IFtdO1xuICAgICAga2V5cy5tYXAoKGtleSkgPT4ge1xuICAgICAgICBsZXQgcmVzITogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+O1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVy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y2ggKGZpbHRlclR5cGUpIHtcbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5NZW1vOiB7XG4gICAgICAgICAgICAgIGlmIChGaWx0ZXJPcHRpb25zLk1lbW8ucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSkge1xuICAgICAgICAgICAgICAgIGxldCBpbnN0cnVjdGlvblRyYW5zZmVyO1xuXG4gICAgICAgICAgICAgICAgLy8gZmV0Y2ggIHRyYW5zZmVyIHRyYW5zYWN0aW9uIGZvciByZWxhdGlvbmFsIG1lbW9cbiAgICAgICAgICAgICAgICB0eE1ldGEudHJhbnNhY3Rpb24ubWVzc2FnZS5pbnN0cnVjdGlvbnMuZm9yRWFjaChcbiAgICAgICAgICAgICAgICAgIChpbnN0cnVjdGlvbikgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgaXNQYXJzZWRJbnN0cnVjdGlvbihpbnN0cnVjdGlvbikgJiZcbiAgICAgICAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLnByb2dyYW0uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wcm9ncmFtLFxuICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciA9IGluc3RydWN0aW9uO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgICAgICAvLyBzcGwtdG9rZW4gb3Igc3lzdGVtXG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciAmJlxuICAgICAgICAgICAgICAgICAgbW9kdWxlTmFtZSAhPT0gaW5zdHJ1Y3Rpb25UcmFuc2ZlclsncHJvZ3JhbSddXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICBkZWJ1Z0xvZyhcbiAgICAgICAgICAgICAgICAgICAgJyMgRmlsdGVyVHlwZS5NZW1vIGJyZWFrIGluc3RydWN0aW9uOiAnLFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIGZldGNoIG1lbW8gb25seSB0cmFuc2FjdGlvblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuT25seU1lbW86IHtcbiAgICAgICAgICAgICAgaWYgKEZpbHRlck9wdGlvbnMuTWVtby5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pKSB7XG4gICAgICAgICAgICAgICAgbGV0IGluc3RydWN0aW9uVHJhbnNmZXI7XG5cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk1pbnQ6IHtcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWludC5pbnRvVXNlclNpZGUoaW5zdHJ1Y3Rpb24sIHR4TWV0YSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuVHJhbnNmZXI6XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBtb2R1bGVOYW1lID09PSBpbnN0cnVjdGlvbi5wcm9ncmFtICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBpZiAoaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgPT09ICd0cmFuc2ZlckNoZWNrZWQnKSB7XG4gICAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLlRyYW5zZmVyQ2hlY2tlZC5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLlRyYW5zZmVyLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIHJldHVybiBoaXN0b3J5O1xuICAgIH07XG59XG4iLCAiaW1wb3J0IHsgUHVia2V5IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCB7IEZpbmRPcHRpb25zLCBIaXN0b3J5IH0gZnJvbSAnfi90eXBlcy9oaXN0b3J5JztcbmltcG9ydCB7IE9uRXJyLCBPbk9rIH0gZnJvbSAnfi90eXBlcy9zaGFyZWQnO1xuaW1wb3J0IHsgRmlsdGVyVHlwZSwgTW9kdWxlTmFtZSB9IGZyb20gJ34vdHlwZXMvdHJhbnNhY3Rpb24tZmlsdGVyJztcbmltcG9ydCB7IFNpZ25hdHVyZXMsIFRyYW5zYWN0aW9uRmlsdGVyIH0gZnJvbSAnfi90cmFuc2FjdGlvbi1maWx0ZXInO1xuXG5leHBvcnQgbmFtZXNwYWNlIE1lbW8ge1xuICBleHBvcnQgY29uc3QgZmluZEJ5T3duZXIgPSBhc3luYyAoXG4gICAgdGFyZ2V0OiBQdWJrZXksXG4gICAgb25PazogT25PazxIaXN0b3J5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9rZW5NZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUmVndWxhck5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJQcm9wZXJ0aWVzIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlckNoZWNrZWQiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyIiwgIkNvbnZlcnRlciIsICJWYWxpZGF0b3IiLCAiTWVzc2FnZSIsICJDb252ZXJ0ZXIiLCAiRmlsdGVyVHlwZSIsICJNb2R1bGVOYW1lIiwgIk5vZGUiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIkNvbW1vbiIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb24iLCAic2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbiIsICJzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uIiwgIlRyYW5zYWN0aW9uIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbiIsICJzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uIiwgIlRyYW5zYWN0aW9uIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbiIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImJzIiwgIk1lbW8iLCAiVHJhbnNhY3Rpb25JbnN0cnVjdGlvbiIsICJTaWduYXR1cmVzIiwgIlRyYW5zYWN0aW9uRmlsdGVyIiwgImluc3RydWN0aW9uIiwgIkNvbnZlcnRlciIsICJNZW1vIiwgIk1lbW8iXQp9Cg== \ No newline at end of file diff --git a/packages/suite-memo/src/create.ts b/packages/suite-memo/src/create.ts index 703caea70..f8d788394 100644 --- a/packages/suite-memo/src/create.ts +++ b/packages/suite-memo/src/create.ts @@ -1,7 +1,7 @@ import { TransactionInstruction } from '@solana/web3.js'; import { TransactionBuilder } from '~/transaction-builder'; import { Constants, Result, Try } from '~/shared'; -import { Pubkey, Secret } from '~/types/account'; +import { Secret } from '~/types/account'; import { MemoOptions } from '~/types/memo'; import bs from 'bs58'; import { CommonStructure } from '~/types/transaction-builder'; @@ -12,19 +12,26 @@ export namespace Memo { export const encode = (data: string): Buffer => Buffer.from(data); + /** + * Create memo + * + * @param {string} data // memo data + * @param {Secret} owner // memo owner + * @param {Partial} options + * @return Promise> + */ export const create = ( data: string, - owner: Pubkey, - signer: Secret, + owner: Secret, options: Partial = {}, ): Result => { return Try(() => { const feePayer = options.feePayer; - const key = owner.toPublicKey() + const key = owner.toKeypair().publicKey ? [ { - pubkey: owner.toPublicKey(), + pubkey: owner.toKeypair().publicKey, isSigner: true, isWritable: true, }, @@ -37,11 +44,11 @@ export namespace Memo { keys: key, }); - const payer = feePayer || signer; + const payer = feePayer || owner; return new TransactionBuilder.Common( [instruction], - [signer.toKeypair()], + [owner.toKeypair()], payer.toKeypair(), ); }); diff --git a/packages/suite-memo/test/create.test.ts b/packages/suite-memo/test/create.test.ts index 06f415635..c196f2d24 100644 --- a/packages/suite-memo/test/create.test.ts +++ b/packages/suite-memo/test/create.test.ts @@ -40,7 +40,7 @@ test('encode', (t) => { }); test('create instruction', (t) => { - const res = Memo.create(DUMMY_DATA, source.pubkey, source.secret); + const res = Memo.create(DUMMY_DATA, source.secret); t.log('# create:', res); t.is(typeof res, 'object'); }); @@ -48,7 +48,6 @@ test('create instruction', (t) => { test('send memo by owner with fee payer', async (t) => { const inst = Memo.create( `{"memo": "send memo by owner", "datetime": ${datetime}}`, - MEMO_STOCK.pubkey, MEMO_STOCK.secret, { feePayer: feePayer.secret }, ); @@ -61,7 +60,6 @@ test('send memo by owner with fee payer', async (t) => { test('send memo and sol transfer by owner', async (t) => { const inst1 = Memo.create( `send memo and sol transfer: ${datetime}`, - MEMO_STOCK.pubkey, MEMO_STOCK.secret, { feePayer: feePayer.secret }, ); @@ -80,7 +78,6 @@ test('send memo and sol transfer by owner', async (t) => { test('send memo and spl-token transfer by owner', async (t) => { const inst = await SplToken.mint( - source.pubkey, source.secret, 10000, 4, @@ -97,7 +94,6 @@ test('send memo and spl-token transfer by owner', async (t) => { const inst1 = Memo.create( `send memo and spl-token transfer: ${datetime}`, - dest.pubkey, dest.secret, { feePayer: feePayer.secret }, ); @@ -123,7 +119,7 @@ test('send memo and spl-token transfer by owner', async (t) => { test('[Err] Over max limit', async (t) => { const overData = 'a'.repeat(2000); - const inst = Memo.create(overData, source.pubkey, source.secret); + const inst = Memo.create(overData, source.secret); const res = await inst.submit(); t.true(res.isErr); diff --git a/packages/suite-multisig/dist/index.js b/packages/suite-multisig/dist/index.js index e42b3a845..d6db6de6c 100644 --- a/packages/suite-multisig/dist/index.js +++ b/packages/suite-multisig/dist/index.js @@ -1798,4 +1798,4 @@ var Multisig4 = { ...Multisig, ...Multisig2, ...Multisig3 }; sleep, unixTimestamp }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9jcmVhdGUudHMiLCAiLi4vLi4vc2hhcmVkL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvc2hhcmVkLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NhbGN1bGF0ZS10eHNpemUudHMiLCAiLi4vLi4vdHlwZXMvc3JjL2dsb2JhbC9pbmRleC50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2lu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IGFycikge1xuICAgICAgICAgIGlmICghYS5pbnN0cnVjdGlvbnMgJiYgIWEuc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoYSl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGFyci5mbGF0TWFwKChhKSA9PiBhLmluc3RydWN0aW9ucyk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gYXJyLmZpbHRlcigoYSkgPT4gYS5mZWVQYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXIucHVibGljS2V5O1xuICAgICAgICAgIGZpbmFsU2lnbmVycyA9IFtmZWVQYXllciwgLi4uc2lnbmVyc107XG4gICAgICAgIH1cbiAgICAgICA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iA9PiB7XG4gICAgICBjb25zdCByZXMgPSBhd2FpdCBtYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG5ldyBLZXlwYWlyLktleXBhaXIoeyBzZWNyZXQ6IGZlZVBheWVyIH0pLnB1YmtleSxcbiAgICAgICAgYWxsb3dPd25lck9mZkN1cnZlLFxuICAgICAgKTtcblxuICAgICAgaWYgKCFyZXMuaW5zdCkge1xuICAgICAgICByZXR1cm4gcmVzLnRva2VuQWNjb3VudDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uPFB1YmtleT4oXG4gICAgICAgIFtyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVlUGF5ZXJ9YCk7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoUkVUUllfU0xFRVBfVElNRSk7XG4gICAgICAgIGNvdW50ZXI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ICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1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kYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge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XN5bmMgKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZWF0ZSB0b2tlbiBhY2NvdW50OiBgLCBlKTtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyBtaW50OiAke21pbnR9LCBvd25lcjogJHtvd25lcn0sIGZlZVBheWVyOiAke2ZlZVBheWVyfWApO1xuICAgICAgICB9XG4gICAgICAgIGF3YWl0IHNsZWVwKFJFVFJZX1NMRUVQX1RJTUUpO1xuICAgICAgICBjb3VudGVyKys7XG4gICAgICB9XG4gICAgICB0aHJvdyBFcnJvcihgcmV0cnkgYWN0aW9uIGlzIG92ZXIgbGltaXQgJHtSRVRSWV9PVkVSX0xJTUlUfWApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBbTWFpbiBsb2dpY11HZXQgQXNzb2NpYXRlZCB0b2tlbiBBY2NvdW50LlxuICAgICAqIGlmIG5vdCBjcmVhdGVkLCBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBmZWVQYXllclxuICAgICAqIEByZX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gICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0LFxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQgeyBLZXlwYWlyIGFzIE9yaWdpbmFsLCBQdWJsaWNLZX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YXRhLmFkZHJlc3MudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Db21wcmVzc2VkTmZ0SW5mcmEgPSAoXG4gICAgICBpbnB1dDogT3B0aW9uPElucHV0Q3JlYXRvcnNbXT4gfCB1bmRlZmluZWQsXG4gICAgKTogSW50ZXJuYWxDcmVhdG9yc1tdID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIFtdO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0IS5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKFxuICAgICAgb3V0cHV0OiBPcHRpb248SW50ZXJuYWxDcmVhdG9yc1tdPixcbiAgICApOiBDcmVhdG9yc1tdIHwgdW5kZWZpbmVkID0+IHtcbiAgICAgIGlmICghb3V0cHV0KSB7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBvdXRwdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvU3RyaW5nKCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGRhdGEudmVyaWZpZWQsXG4gICAgICAgIH07XG4gICAgICB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BjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9XG4gICAgICAgICAgJ0NhdWdodCBpbiB0aGUgdmFsaWRhdGlvbiBlcnJvcnMuIHNlZSBpbmZvcm1hdGlvbiBlLmc6IGVycjxWYWxpZGF0b3JFcnJvcj4uZGV0YWlscyc7XG4gICAgICAgIHRocm93IG5ldyBWYWxpZGF0b3JFcnJvcihtZXNzYWdlLCByZXN1bHRzKTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBNZXNzYWdlLlNVQ0NFU1M7XG4gICAgfSk7XG4gIH07XG5cbiAgdHlwZSBQaWNrTmZ0U3R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ZXJ0ZXIiLCAiVHJhbnNmZXIiLCAiQ29udmVydGVyIiwgIlZhbGlkYXRvciIsICJNZXNzYWdlIiwgIkNvbnZlcnRlciIsICJGaWx0ZXJUeXBlIiwgIk1vZHVsZU5hbWUiLCAiTXVsdGlzaWciLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIk11bHRpc2lnSW5zdHJ1Y3Rpb24iLCAiaW1wb3J0X3NwbF90b2tlbiIsICJpbXBvcnRfd2ViMyIsICJNdWx0aXNpZyIsICJNdWx0aXNpZyIsICJNdWx0aXNpZyJdCn0K \ No newline at end of file diff --git a/packages/suite-multisig/dist/index.mjs b/packages/suite-multisig/dist/index.mjs index cd5906144..4fc268ae6 100644 --- a/packages/suite-multisig/dist/index.mjs +++ b/packages/suite-multisig/dist/index.mjs @@ -1770,4 +1770,4 @@ export { sleep, unixTimestamp }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2NyZWF0ZS50cyIsICIuLi8uLi9zaGFyZWQvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vc2hhcmVkL3NyYy9zaGFyZWQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi90eXBlcy9zcmMvZ2xvYmFsL2luZGV4LnRzIiwgIi4uLy4uL2dsb2JhbC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vYWN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yA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IG9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IE1BWF9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICBvcHRpb25zLFxuICAgICAgICApO1xuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEFueU9iamVjdCB9IGZyb20gJ34vdHlwZXMvc2hhcmVkJztcbmltcG9ydCB7IENvbnN0YW50cyB9IGZyb20gJy4vY29uc3RhbnRzJztcbmltcG9ydCB7IFJlc3VsdCB9IGZyb20gJy4vcmVzdWx0JztcblxuLyoqXG4gKiBjb252ZXJ0IGJ1ZmZlciB0byBBcnJheVxuICpcbiAqIEBwYXJhbSB7QnVmZmVyfSBidWZmZXJcbiAqIEByZXR1cm5zIG51bWJlcltdXG4gKi9cbmV4cG9ydCBjb25zdCBidWZmZXJUb0FycmF5ID0gKGJ1ZmZlcjogQnVmZmVyKTogbnVtYmVyW10gPT4ge1xuICBjb25zdCBudW1zID0gW107XG4gIGZvciAoY29u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QYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVlUGF5ZXJ9YCk7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoUkVUUllfU0xFRVBfVElNRSk7XG4gICAgICAgIGNvdW50ZXIrKztcbiAgICAgIH1cbiAgICAgIHRocm93IEVycm9yKGByZXRyeSBhY3Rpb24gaXMgb3ZlciBsaW1pdCAke1JFVFJZX09WRVJfTElNSVR9YCk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFtNYWluIGxvZ2ljXUdldCBBc3NvY2lhdGVkIHRva2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb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IGlmIChmZWVQYXllcikge1xuICAgIGxldCBpID0gMTtcbiAgICBmb3IgYXdhaXQgKGNvbnN0IG9iaiBvZiB0aGlzKSB7XG4gICAgICBpZiAob2JqLmlzRXJyKSB7XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgICB9IGVsc2UgaWYgKG9iai52YWx1ZS5jYW5TdWJtaXQpIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIGNhblN1Ym1pdCcpO1xuICAgICAgICBjb25zdCBzaWcgPSBhd2FpdCAob2JqIGFzIFBhcnRpYWxTaWduU3RydWN0dXJlKS5zdWJtaXQoZmVlUGF5ZXIpO1xuICAgICAgICBpZiAoc2lnLmlzRXJyKSB7XG4gICAgICAgICAgcmV0dXJuIHNpZztcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhzaWcudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIG90aGVyIHRoYW4gY2FuU3VibWl0Jyk7XG4gICAgICAgIGlmICh0aGlzLmxlbmd0aCA9PSBpKSB7XG4gICAgICAgICAgLy8gbGFzdCBvYmplY3RcbiAgICAgICAgICByZXR1cm4gb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICAgIH1cbiAgICAgICAgb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICB9XG4gICAgICBpKys7XG4gICAgfVxuICB9IGVsc2Uge1xuICAgIGNvbnN0IGluc3RydWN0aW9uczogQ29tbW9uU3RydWN0dXJlIHwgTWludFN0cnVjdHVyZVtdID0gW107XG4gICAgZm9yIChjb25zdCBvYmogb2YgdGhpcykge1xuICAgICAgaWYgKG9iai5pc0Vycikge1xuICAgICAgICByZXR1cm4gb2JqO1xuICAgICAgfSBlbHNlIGlmIChvYmouaXNPaykge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChvYmoudmFsdWUpO1xuICAgIC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iA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgUGFyc2VkVHJhbnNhY3Rpb25XaXRoTWV0YSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQb3N0VG9rZW5BY2NvdW50IH0gZnJvbSAnfi90eXBlcy90cmFuc2FjdGlvbi1maWx0ZXInO1xuaW1wb3J0IHsgSGlzdG9yeSB9IGZyb20gJ34vdHlwZXMvaGlzdG9yeSc7XG4vKiBlc2xpb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iAgPihcbiAgICBtZXRhZGF0YTogVCxcbiAgKTogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+ID0+IHtcbiAgICByZXR1cm4gVHJ5KCgpID0+IHtcbiAgICAgIGNvbnN0IGtleXMgPSBPYmplY3Qua2V5cyhtZXRhZGF0YSk7XG4gICAgICBjb25zdCByZXN1bHRzOiBEZXRhaWxzW10gPSBbXTtcbiAgICAgIGtleXMubWFwKChrZXkpID0+IHtcbiAgICAgICAgbGV0IHJlcyE6IFJlc3VsdDxzdHJpbmcsIFZhbGlkYXRvckVycm9yPjtcbiAgICAgICAgc3dpdGNoIChrZXkpIHtcbiAgICAgICAgICBjYXNlICdpbWFnZSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLmltYWdlKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzSW1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW9uIGUuZzogZXJyPFZhbGlkYXRvckVycm9yPi5kZXRhaWxzJztcbiAgICAgICAgdGhyb3cgbmV3IFZhbGlkYXRvckVycm9yKG1lc3NhZ2UsIHJlc3VsdHMpO1xuICAgICAgfVxuICAgICAgcmV0dXJuIE1lc3NhZ2UuU1VDQ0VTUztcbiAgICB9KTtcbiAgfTtcblxuICB0eXBlIFBpY2tOZn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HUkFNX0lEIiwgIlB1YmxpY0tleSIsICJNdWx0aXNpZyIsICJUT0tFTl9QUk9HUkFNX0lEIiwgIlB1YmxpY0tleSIsICJNdWx0aXNpZyIsICJNdWx0aXNpZyJdCn0K \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2NyZWF0ZS50cyIsICIuLi8uLi9zaGFyZWQvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vc2hhcmVkL3NyYy9zaGFyZWQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi90eXBlcy9zcmMvZ2xvYmFsL2luZGV4LnRzIiwgIi4uLy4uL2dsb2JhbC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvYXNzb2NpYXRlZC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9rZXlwYWlyLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL3BkYS50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9pbmRleC50cyIsICIuLi8uLi9zaGFyZWQvc3JjL3Jlc3VsdC50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NvbGxlY3Rpb24udHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9jcmVhdG9ycy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dCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZWF0ZSB0b2tlbiBhY2NvdW50OiBgLCBlKTtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyBtaW50OiAke21pbnR9LCBvd25lcjogJHtvd25lcn0sIGZlZVBheWVyOiAke2ZlZVBheWVyfWApO1xuICAgICAgICB9XG4gICAgICAgIGF3YWl0IHNsZWVwKFJFVFJZX1NMRUVQX1RJTUUpO1xuICAgICAgICBjb3VudGVyKys7XG4gICAgICB9XG4gICAgICB0aHJvdyBFcnJvcihgcmV0cnkgYWN0aW9uIGlzIG92ZXIgbGltaXQgJHtSRVRSWV9PVkVSX0xJTUlUfWApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBbTWFpbiBsb2dpY11HZXQgQXNzb2NpYXRlZCB0b2tlbiBBY2NvdW50LlxuICAgICAqIGlmIG5vdCBjcmVhdGVkLCBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBj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ZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0LFxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQgeyBLZXlwYWlyIGFzIE9yaWdpbmFsLCBQdWJsaWNLZXkgfSBmcm9tICdAc29sYW5hL3dlYjMuanMnO1xuaW1wb3J0IHsgUHVia2V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iAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9XG4gICAgICAgICAgJ0NhdWdodCBpbiB0aGUgdmFsaWRhdGlvbiBlcnJvcnMuIHNlZSBpbmZvcm1hdGlvbiBlLmc6IGVycjxWYWxpZGF0b3JFcnJvcj4uZGV0YWlscyc7XG4gICAgICAgIHRocm93IG5ldyBWYWxpZGF0b3JFcnJvcihtZXNzYWdlLCByZXN1bHRzKTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBNZXNzYWdlLlNVQ0NFU1M7XG4gICAgfSk7XG4gIH07XG5cbiAgdHlwZSBQaWNrTmZ0U3RvcmFnZSA9IFBpY2s8XG4gICAgT2ZmY2hhaW4sXG4gICAgJ25hbWUnI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U5fUFJPR1JBTV9JRCIsICJQdWJsaWNLZXkiLCAiTXVsdGlzaWciLCAiTXVsdGlzaWciXQp9Cg== \ No newline at end of file diff --git a/packages/suite-multisig/src/create.ts b/packages/suite-multisig/src/create.ts index 5536af015..405063754 100644 --- a/packages/suite-multisig/src/create.ts +++ b/packages/suite-multisig/src/create.ts @@ -14,6 +14,14 @@ import { TransactionBuilder } from '~/transaction-builder'; import { CommonStructure } from '~/types/transaction-builder'; export namespace Multisig { + /** + * Create multisig + * + * @param {number} m // number of multisig + * @param {Secret} feePayer // memo owner + * @param {Pubkey[]} signerPubkeys // signers + * @return Promise, Error>> + */ export const create = async ( m: number, feePayer: Secret, diff --git a/packages/suite-phantom/dist/index.mjs b/packages/suite-phantom/dist/index.mjs index 3c574dff3..a0872b2b5 100644 --- a/packages/suite-phantom/dist/index.mjs +++ b/packages/suite-phantom/dist/index.mjs @@ -1556,10 +1556,10 @@ var SplToken; // ../suite-spl-token/src/add.ts var SplToken2; ((SplToken11) => { - SplToken11.add = async (token, owner, signers, totalAmount, mintDecimal, options = {}) => { + SplToken11.add = async (token, owner, ownerOrMultisig, totalAmount, mintDecimal, options = {}) => { return Try(async () => { - const payer = options.feePayer ? options.feePayer : signers[0]; - const keypairs = signers.map((s) => s.toKeypair()); + const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); const tokenAssociated = await Account4.Associated.retryGetOrCreate( token, owner, @@ -1590,14 +1590,14 @@ import { } from "@solana/spl-token"; var SplToken3; ((SplToken11) => { - SplToken11.burn = (mint, owner, signers, burnAmount, tokenDecimals, options = {}) => { + SplToken11.burn = (mint, owner, ownerOrMultisig, burnAmount, tokenDecimals, options = {}) => { return Try(() => { const tokenAccount = getAssociatedTokenAddressSync2( mint.toPublicKey(), owner.toPublicKey() ); - const payer = options.feePayer ? options.feePayer : signers[0]; - const keypairs = signers.map((s) => s.toKeypair()); + const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); const inst = createBurnCheckedInstruction( tokenAccount, mint.toPublicKey(), @@ -1790,12 +1790,12 @@ import { createTransferCheckedInstruction } from "@solana/spl-token"; import { Transaction as Transaction5 } from "@solana/web3.js"; var SplToken6; ((SplToken11) => { - SplToken11.gasLessTransfer = async (mint, owner, dest, signers, amount, mintDecimal, feePayer) => { + SplToken11.gasLessTransfer = async (mint, owner, dest, amount, mintDecimal, feePayer) => { return Try(async () => { - const keypairs = signers.map((s) => s.toKeypair()); + const ownerPublicKey = owner.toKeypair().publicKey; const sourceToken = await Account4.Associated.makeOrCreateInstruction( mint, - owner, + ownerPublicKey.toString(), feePayer ); const destToken = await Account4.Associated.makeOrCreateInstruction( @@ -1815,10 +1815,10 @@ var SplToken6; sourceToken.tokenAccount.toPublicKey(), mint.toPublicKey(), destToken.tokenAccount.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, SplToken.calculateAmount(amount, mintDecimal), mintDecimal, - keypairs + [owner.toKeypair()] ); tx.add(inst2); } else { @@ -1826,17 +1826,15 @@ var SplToken6; sourceToken.tokenAccount.toPublicKey(), mint.toPublicKey(), destToken.tokenAccount.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, SplToken.calculateAmount(amount, mintDecimal), mintDecimal, - keypairs + [owner.toKeypair()] ); tx.add(destToken.inst).add(inst2); } tx.recentBlockhash = blockhashObj.blockhash; - keypairs.forEach((signer) => { - tx.partialSign(signer); - }); + tx.partialSign(owner.toKeypair()); const serializedTx = tx.serialize({ requireAllSignatures: false }); @@ -2158,7 +2156,7 @@ var SplToken7; ); return instructions; }; - SplToken11.mint = async (owner, signer, totalAmount, mintDecimal, input, options = {}) => { + SplToken11.mint = async (owner, totalAmount, mintDecimal, input, options = {}) => { return Try(async () => { const valid = Validator.checkAll(input); if (valid.isErr) { @@ -2166,9 +2164,10 @@ var SplToken7; } const { feePayer, freezeAuthority } = options; const storageType = input.storageType || DEFAULT_STORAGE_TYPE; - const payer = feePayer ? feePayer : signer; + const payer = feePayer ? feePayer : owner; input.royalty = 0; const sellerFeeBasisPoints = 0; + const ownerPublicKey = owner.toKeypair().publicKey; const storageMetadata = Storage.toConvertOffchaindata( input, input.royalty @@ -2211,7 +2210,7 @@ var SplToken7; const mint2 = Account4.Keypair.create(); const insts = await (0, SplToken11.createMint)( mint2.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, totalAmount, mintDecimal, datav2, @@ -2222,14 +2221,14 @@ var SplToken7; insts.push( (0, SplToken11.createFreezeAuthority)( mint2.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, freezeAuthority.toPublicKey() ) ); } return new TransactionBuilder.Mint( insts, - [signer.toKeypair(), mint2.toKeypair()], + [owner.toKeypair(), mint2.toKeypair()], payer.toKeypair(), mint2.pubkey ); @@ -2269,10 +2268,10 @@ var SplToken8; import { createTransferCheckedInstruction as createTransferCheckedInstruction2 } from "@solana/spl-token"; var SplToken9; ((SplToken11) => { - SplToken11.transfer = async (mint, owner, dest, signers, amount, mintDecimal, options = {}) => { + SplToken11.transfer = async (mint, owner, dest, ownerOrMultisig, amount, mintDecimal, options = {}) => { return Try(async () => { - const payer = options.feePayer ? options.feePayer : signers[0]; - const keypairs = signers.map((s) => s.toKeypair()); + const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); const sourceToken = await Account4.Associated.retryGetOrCreate( mint, owner, @@ -2314,11 +2313,18 @@ var RegularNft; ((RegularNft11) => { const NFT_AMOUNT = 1; const NFT_DECIMALS = 0; - RegularNft11.burn = (mint, owner, signer, options = {}) => { - const feePayer = options.feePayer ? options.feePayer : signer; - return SplToken10.burn(mint, owner, [signer], NFT_AMOUNT, NFT_DECIMALS, { - feePayer - }); + RegularNft11.burn = (mint, owner, ownerOrMultisig, options = {}) => { + const feePayer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + return SplToken10.burn( + mint, + owner, + ownerOrMultisig, + NFT_AMOUNT, + NFT_DECIMALS, + { + feePayer + } + ); }; })(RegularNft || (RegularNft = {})); @@ -2485,15 +2491,16 @@ var RegularNft4; ); return instructions; }; - RegularNft11.mint = async (owner, signer, input, options = {}) => { + RegularNft11.mint = async (owner, input, options = {}) => { return Try(async () => { const valid = Validator.checkAll(input); if (valid.isErr) { throw valid.error; } const { feePayer, freezeAuthority } = options; - const payer = feePayer ? feePayer : signer; + const payer = feePayer ? feePayer : owner; const storageType = input.storageType || DEFAULT_STORAGE_TYPE; + const ownerPublicKey = owner.toKeypair().publicKey; let properties; if (input.properties) { properties = await Converter14.Properties.intoInfra( @@ -2553,7 +2560,7 @@ var RegularNft4; const mint2 = Account4.Keypair.create(); const instructions = await (0, RegularNft11.createMint)( mint2.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, datav2, payer.toKeypair().publicKey, isMutable @@ -2562,7 +2569,7 @@ var RegularNft4; instructions.push( (0, RegularNft11.createDeleagate)( mint2.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, freezeAuthority.toPublicKey() ) ); @@ -2576,7 +2583,7 @@ var RegularNft4; ) ); } - const keypairs = [signer.toKeypair(), mint2.toKeypair()]; + const keypairs = [owner.toKeypair(), mint2.toKeypair()]; if (input.creators) { input.creators.forEach((creator) => { if (Account4.Keypair.isSecret(creator.secret)) { @@ -2602,14 +2609,16 @@ import { Transaction as Transaction6 } from "@solana/web3.js"; var RegularNft5; ((RegularNft11) => { const DEFAULT_STORAGE_TYPE = "nftStorage"; - RegularNft11.gasLessMint = async (owner, signer, input, feePayer, options = {}) => { + RegularNft11.gasLessMint = async (owner, input, feePayer, options = {}) => { return Try(async () => { const valid = Validator.checkAll(input); if (valid.isErr) { throw valid.error; } const storageType = input.storageType || DEFAULT_STORAGE_TYPE; - const sellerFeeBasisPoints = Converter14.Royalty.intoInfra(input.royalty); + const royalty = input.royalty ? input.royalty : 0; + const sellerFeeBasisPoints = Converter14.Royalty.intoInfra(royalty); + const ownerPublickey = owner.toKeypair().publicKey; let uri = ""; if (input.filePath) { const properties = await Converter14.Properties.intoInfra( @@ -2654,7 +2663,7 @@ var RegularNft5; const mint = Account4.Keypair.create(); const insts = await RegularNft4.createMint( mint.toPublicKey(), - owner.toPublicKey(), + ownerPublickey, datav2, feePayer.toPublicKey(), isMutable @@ -2663,7 +2672,7 @@ var RegularNft5; insts.push( RegularNft4.createDeleagate( mint.toPublicKey(), - owner.toPublicKey(), + ownerPublickey, options.freezeAuthority.toPublicKey() ) ); @@ -2676,7 +2685,7 @@ var RegularNft5; }); insts.forEach((inst) => tx.add(inst)); tx.recentBlockhash = blockhashObj.blockhash; - [signer, mint].forEach((signer2) => tx.partialSign(signer2.toKeypair())); + [owner, mint].forEach((signer) => tx.partialSign(signer.toKeypair())); const serializedTx = tx.serialize({ requireAllSignatures: false }); @@ -2691,12 +2700,11 @@ var RegularNft6; ((RegularNft11) => { const NFT_AMOUNT = 1; const NFT_DECIMALS = 0; - RegularNft11.gasLessTransfer = async (mint, owner, dest, signers, feePayer) => { + RegularNft11.gasLessTransfer = async (mint, owner, dest, feePayer) => { return SplToken10.gasLessTransfer( mint, owner, dest, - signers, NFT_AMOUNT, NFT_DECIMALS, feePayer @@ -2710,15 +2718,16 @@ var RegularNft7; ((RegularNft11) => { RegularNft11.DEFAULT_COLLECTION_SIZE = 0; const DEFAULT_STORAGE_TYPE = "nftStorage"; - RegularNft11.mintCollection = (owner, signer, input, options = {}) => { + RegularNft11.mintCollection = (owner, input, options = {}) => { return Try(async () => { const valid = Validator.checkAll(input); if (valid.isErr) { throw valid.error; } const { freezeAuthority, feePayer, collectionSize } = options; - const payer = feePayer ? feePayer : signer; + const payer = feePayer ? feePayer : owner; const storageType = input.storageType || DEFAULT_STORAGE_TYPE; + const ownerPublicKey = owner.toKeypair().publicKey; let properties; if (input.properties) { properties = await Converter14.Properties.intoInfra( @@ -2771,7 +2780,7 @@ var RegularNft7; ); const instructions = await RegularNft4.createMint( collectionMint.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, datav2, payer.toKeypair().publicKey, isMutable @@ -2780,14 +2789,14 @@ var RegularNft7; instructions.push( RegularNft4.createDeleagate( collectionMint.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, freezeAuthority.toPublicKey() ) ); } const collections = { collectionMetadata: collectionMetadataAccount, - collectionAuthority: signer.toKeypair().publicKey, + collectionAuthority: owner.toKeypair().publicKey, collectionMint: collectionMint.toKeypair().publicKey }; instructions.push( @@ -2799,7 +2808,7 @@ var RegularNft7; ); return new TransactionBuilder.Mint( instructions, - [signer.toKeypair(), collectionMint.toKeypair()], + [owner.toKeypair(), collectionMint.toKeypair()], payer.toKeypair(), collectionMint.pubkey ); @@ -2842,12 +2851,12 @@ var RegularNft9; ((RegularNft11) => { const NFT_AMOUNT = 1; const NFT_DECIMALS = 0; - RegularNft11.transfer = (mint, owner, dest, signers, options = {}) => { + RegularNft11.transfer = (mint, owner, dest, ownerOrMultisig, options = {}) => { return SplToken10.transfer( mint, owner, dest, - signers, + ownerOrMultisig, NFT_AMOUNT, NFT_DECIMALS, options @@ -2886,7 +2895,8 @@ var PhantomMetaplex; Storage.uploadFile, input.storageType ); - const sellerFeeBasisPoints = Converter14.Royalty.intoInfra(input.royalty); + const royalty = input.royalty ? input.royalty : 0; + const sellerFeeBasisPoints = Converter14.Royalty.intoInfra(royalty); const nftStorageMetadata = Storage.toConvertOffchaindata( { ...input, properties }, sellerFeeBasisPoints @@ -3062,4 +3072,4 @@ export { Metaplex, PhantomSplToken3 as PhantomSplToken }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vc2hhcmVkL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vc2hhcmVkL3NyYy9zaGFyZWQudHMiLCAiLi4vLi4vc2hhcmVkL3NyYy9yZXN1bHQudHMiLCAiL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mVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXIucHVibGljS2V5O1xuICAgICAgICAgIGZpbmFsU2lnbmVycyA9IFtmZWVQYXllciwgLi4uc2lnbmVyc107XG4gICAgICAgIH1cbiAgICAgICAgaW5zdHJ1Y3Rpb25zLm1hcCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICAvLyBDYWxjdWxhdGVUeHNpemUuaXNNYXhUcmFuc2FjdGlvblNpemUodHJhbnNhY3Rpb24sIGZlZVBheWVyLnB1YmxpY0tleSk7XG5cbiAgICAgICAgY29uc3Qgb3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogTUFYX1JFVFJJRVMsXG4gICAgICAgIH07XG5cbiAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICk7XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgQ29tbWl0bWVudCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmlt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AgfSBlbHNlIGlmIChpbnN0IGluc3RhbmNlb2YgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbikge1xuICAgICAgICAgICAgKGF3YWl0IGluc3Quc3VibWl0KCkpLm1hcChcbiAgICAgICAgICAgICAgYXN5bmMgKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZWF0ZSB0b2tlbiBhY2NvdW50OiBgLCBlKTtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyBtaW50OiAke21pbnR9LCBvd25lcjogJHtvd25lcn0sIGZlZVBheWVyOiAke2ZlZVBheWVyfWApO1xuICAgICAgICB9XG4gICAgICAgIGF3YWl0IHNsZWVwKFJFVFJZX1NMRUVQX1RJTUUpO1xuICAgICAgICBjb3VudGVyKys7XG4gICAgICB9XG4gICAgICB0aHJvdyBFcnJvcihgcmV0cnkgYWN0aW9uIGlzIG92ZXIgbGltaXQgJHtSRVRSWV9PVkVSX0xJTUlUfWApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBbTWFpbiBsb2dpY11HZXQgQXNzb2NpYXRlZCB0b2tlbiBBY2NvdW50LlxuICAgICAqIGlmIG5vdCBjcmVhdGVkLCBjcmVhdGUgbmV3IHRva2VuIGFj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GFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bn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rva2VuQWNjb3VudC5maW5kKFxuICAgICAgICAgIChtKSA9PiBtLmFjY291bnQgPT09IG91dHB1dC5wYXJzZWQuaW5mby5zb3VyY2UsXG4gICAgICAgICk7XG4gICAgICAgIGNvbnN0IGZvdW5kRGVzdCA9IG1hcHBpbmdUb2tlbkFjY291bnQuZmluZChcbiAgICAgICAgICAobSkgPT4gbS5hY2NvdW50ID09PSBvdXRwdXQucGFyc2VkLmluZm8uZGVzdGluYXRpb24sXG4gICAgICAgICk7XG4gICAgICAgIGZvdW5kU291cmNlICYmIChoaXN0b3J5LnNvdXJjZSA9IGZvdW5kU291cmNlLm93bmVyKTtcbiAgICAgICAgZm91bmREZXN0ICYmIChoaXN0b3J5LmRlc3RpbmF0aW9uID0gZm91bmREZXN0Lm93bmVyKTtcbiAgICAgIH1cblxuICAgICAgaGlzdG9yeS50b2tlbkFtb3VudCA9IG91dHB1dC5wYXJzZWQuaW5mby50b2tlbkFtb3VudDtcbiAgICAgIGhpc3RvcnkubWludCA9IG91dHB1dC5wYXJzZWQuaW5mby5taW50O1xuICAgICAgaGlzdG9yeS5tdWx0aXNpZ0F1dGhvcml0eSA9IG91dHB1dC5wYXJzZWQuaW5mby5tdWx0aXNpZ0F1dGhvcml0eTtcbiAgICAgIGhpc3Rvcnkuc2lnbmVycyA9IG91dHB1dC5wYXJzZWQuaW5mby5zaWduZXJzO1xuICAgICAgaGlzdG9yeS50eXBlID0gb3V0cHV0LnByb2dyYW07XG4gICAgICBoaXN0b3J5LmRhdGVUaW1lID0gY29udmVydFRpbWVzdGFtcFRvRGF0ZVRpbWUobWV0YS5ibG9ja1RpbWUgYXMgbnVtYmVyKTtcbiAgICAgIGhpc3Rvcnkuc2lnID0gbWV0YS50cmFuc2FjdGlvbi5zaWduYXR1cmVzWzBdO1xuICAgICAgaGlzdG9yeS5pbm5lckluc3RydWN0aW9uID0gZmFsc2U7XG5cbiAgICAgIC8vIGlubmVyIGluc3RydWN0aW9uc1xuICAgICAgaWYgKFxuICA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AgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcb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7XG4gICAgICAgICAgY29udGludWU7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgbWludCA9IGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLm1pbnQgYXMgUHVia2V5O1xuICAgICAgICBjb25zdCB0b2tlbkFtb3VudCA9IGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLnRva2VuQW1vdW50XG4gICAgICAgICAgLmFtb3VudCBhcyBzdHJpbmc7XG5cbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICBjb25zdCBtZXRhZGF0YSA9IGF3YWl0IE1ldGFkYXRhLmZyb21BY2NvdW50QWRkcmVzcyhcbiAgICAgICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgICAgICBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShtaW50KSxcbiAgICAgICAgICApO1xuICAgICAgICAgIGRlYnVnTG9nKCcjIGZpbmRCeU93bmVyIG1ldGFkYXRhOiAnLCBtZXRhZGF0YSk7XG4gICAgICAgICAgLy8gdG9rZW5TdGFuZGFyZDogMChORlQpIG9yIDIgKFNQTC1UT0tFTilcbiAgICAgICAgICBpZiAobWV0YWRhdGEudG9rZW5TdGFuZGFyZCAhPT0gdG9rZW5TdGFuZGFyZCkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuICAgICAgICAgIGZldGNoKG1ldGFkYXRhLmRhdGEudXJpKVxuICAgICAgICAgICAgLnRoZW4oKHJlc3BvbnNlKSA9PiB7XG4gICAgICAgICAgICAgIHJlc3BvbnNlXG4gICAgICAgICAgICAgICAgLmpzb24oKVxuICAgICAgICAgICAgICAgIC50aGVuKChqc29uOiBPZmZjaGFpbikgPT4ge1xuICAgICAgICAgICAgICAgICAgZGF0YS5wdXNoKFxuICAgICAgICAgICAgICAgICAgICBjb252ZXJ0ZXI8VD4odG9rZW5TdGFuZGFyZCwgbWV0YWRhdGEsIGpzb24sIHRva2VuQW1vdW50KSxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICBjYWxsYmFjayhSZXN1bHQub2soZGF0YSkpOyAvLyBuZWVkIHRoaXMgY2FsbCA/XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAuY2F0Y2goKGUpID0+IHtcbiAgICAgICAgICAgICAgICAgIGNhbGxiYWNrKFJlc3VsdC5lcnIoZSkpO1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgLmZpbmFsbHkoKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgY29uc3QgZGVzY0FsZ28gPSBzb3J0QnlVaW5peFRpbWVzdGFtcDxUPihTb3J0RGlyZWN0aW9uLkRlc2MpO1xuICAgICAgICAgICAgICAgICAgY29uc3QgYXNjQWxnbyA9IHNvcnRCeVVpbml4VGltZXN0YW1wPFQ+KFNvcnREaXJlY3Rpb24uQXNjKTtcbiAgICAgICAgICAgICAgICAgIGlmIChzb3J0YWJsZSA9PT0gU29ydERpcmVjdGlvbi5EZXNjKSB7XG4gICAgICAgICAgICAgICAgICAgIGRhdGEgPSBkYXRhLnNvcnQoZGVzY0FsZ28pO1xuICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChzb3J0YWJsZSA9PT0gU29ydERpcmVjdGlvbi5Bc2MpIHtcbiAgICAgICAgICAgICAgICAgICAgZGF0YSA9IGRhdGEuc29ydChhc2NBbGdvKTtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIGNhbGxiYWNrKFJlc3VsdC5vayhkYXRhKSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgLmNhdGNoKChlKSA9PiB7XG4gICAgICAgICAgICAgIGNhbGxiYWNrKFJlc3VsdC5lcnIoZSkpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBpZiAoZSBpbnN0YW5jZW9mIEVycm9yICYmIFVOQUJMRV9FUlJPUl9S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4gICAgICAgIG1pbnQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBmZWVQYXllcixcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGRlc3RUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5tYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgZGVzdCxcbiAgICAgICAgZmVlUGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBsZXQgaW5zdDI7XG4gICAgICBjb25zdCBibG9ja2hhc2hPYmogPSBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5nZXRMYXRlc3RCbG9ja2hhc2goKTtcblxuICAgICAgY29uc3QgdHggPSBuZXcgVHJhbnNhY3Rpb24oe1xuICAgICAgICBsYXN0VmFsaWRCbG9ja0hlaWdodDogYmxvY2toYXNoT2JqLmxhc3RWYWxpZEJsb2NrSGVpZ2h0LFxuICAgICAgICBibG9ja2hhc2g6IGJsb2NraGFzaE9iai5ibG9ja2hhc2gsXG4gICAgICAgIGZlZVBheWVyOiBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgfSk7XG5cbiAgICAgIC8vIHJldHVybiBhc3NvY2lhdGVkIHRva2VuIGFjY291bnRcbiAgICAgIGlmICghZGVzdFRva2VuLmluc3QpIHtcbiAgICAgICAgaW5zdDIgPSBjcmVhdGVUcmFuc2ZlckNoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgICBzb3VyY2VUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgZGVzdFRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgQ2FsY3VsYXRvci5jYWxjdWxhdGVBbW91bnQoYW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgICAga2V5cGFpcnMsXG4gICAgICAgICk7XG4gICAgICAgIHR4LmFkZChpbnN0Mik7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICAvLyByZXR1cm4gaW5zdHJ1Y3Rpb24gYW5kIHVuZGVjaWRlZCBhc3NvY2lhdGVkIHRva2VuIGFjY291bnRcbiAgICAgICAgaW5zdDIgPSBjcmVhdGVUcmFuc2ZlckNoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgICBzb3VyY2VUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgZGVzdFRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgQ2FsY3VsYXRvci5jYWxjdWxhdGVBbW91bnQoYW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgICAga2V5cGFpcnMsXG4gICAgICAgICk7XG4gICAgICAgIHR4LmFkZChkZXN0VG9rZW4uaW5zdCkuYWRkKGluc3QyKTtcbiAgICAgIH1cblxuICAgICAgdHgucmVjZW50QmxvY2toYXNoID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcbiAgICAgIGtleXBhaXJzLmZvckVhY2goKHNpZ25lcikgPT4ge1xuICAgICAgICB0eC5wYXJ0aWFsU2lnbihzaWduZXIpO1xuICAgICAgfSk7XG5cbiAgICAgIGNvbnN0IHNlcmlhbGl6ZWRUeCA9IHR4LnNlcmlhbGl6ZSh7XG4gICAgICAgIHJlcXVpcmVBbGxTaWduYXR1cmVzOiBmYWxzZSxcbiAgICAgIH0pO1xuICAgICAgY29uc3QgaGV4ID0gc2VyaWFsaXplZFR4LnRvU3RyaW5nKCdoZXgnKTtcbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25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gbWludERlY2ltYWwsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBvd25lcixcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICBmZWVQYXllcixcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgbWludCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBDYWxjdWxhdGUuY2FsY3VsYXRlQW1vdW50KHRvdGFsQW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNZXRhZGF0YUFjY291bnRWM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgbWV0YWRhdGE6IG1ldGFkYXRhUGRhLFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNZXRhZGF0YUFjY291bnRBcmdzVjM6IHtcbiAgICAgICAgICAgIGRhdGE6IHRva2VuTWV0YWRhdGEsXG4gICAgICAgICAgICBpc011dGFibGUsXG4gICAgICAgICAgICBjb2xsZWN0aW9uRGV0YWlscz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XkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgdG90YWxBbW91bnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RzLnB1c2goXG4gICAgICAgICAgY3JlYXRlRnJlZXplQXV0aG9yaXR5KFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLk1pbnQoXG4gICAgICAgIGluc3RzLFxuICAgICAgICBbc2lnbmVyLnRvS2V5cGFpcigpLCBtaW50LnRvS2V5cGFpcigpXSxcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIG1pbnQucHVia2V5LFxuICAgICAgKTtcbiAgICB9KTtcbiAgfTtcbn1cbiIsICJpbXBvcnQgeyBDb25zdGFudHMsIGRlYnVnTG9nLCBpc0Jyb3dzZXIsIGlzTm9kZSB9IGZyb20gJ34vc2hhcmVkJztcbmltcG9ydCB7IEZpbGVUeXBlLCBJZGVudGl0eSwgVGFncywgVXBsb2FkYWJsZUZpbGVUeXBlIH0gZnJvbSAnfi90eXBlcy9zdG9yYWdlJztcbmltcG9ydCB7IFBoYW50b21Qcm92aWRlciB9IGZyb20gJ34vdHlwZXMvcGhhbnRvbSc7XG5pbXBvcnQgSXJ5cywgeyBXZWJJcnlzIH0gZnJvb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cHRpb25zLmZlZVBheWVyIDogc2lnbmVyc1swXTtcbiAgICAgIGNvbnN0IGtleXBhaXJzID0gc2lnbmVycy5tYXAoKHMpID0+IHMudG9LZXlwYWlyKCkpO1xuXG4gICAgICBjb25zdCBzb3VyY2VUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5yZXRyeUdldE9yQ3JlYXRlKFxuICAgICAgICBtaW50LFxuICAgICAgICBvd25lcixcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBkZXN0VG9rZW4gPSBhd2FpdCBBY2NvdW50LkFzc29jaWF0ZWQucmV0cnlHZXRPckNyZWF0ZShcbiAgICAgICAgbWludCxcbiAgICAgICAgZGVzdCxcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpbnN0ID0gY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHNvdXJjZVRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgZGVzdFRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIENhbGN1bGF0b3IuY2FsY3VsYXRlQW1vdW50KGFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAga2V5cGFpcnMsXG4gICAgICApO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24oW2luc3RdLCBrZXlwYWlycywgcGF5ZXIudG9LZXlwYWlyKCkpO1xuICAgIH0pO1xuICB9O1xufVxuIiwgImltcG9ydCB7IFNwbFRva2VuIGFzIEFkZCB9IGZyb20gJy4vYWRkJztcbmltcG9ydCB7IFNwbFRva2VuIGFzIEJ1cm4gfSBmcm9tICcuL2J1cm4nO1xuaW1wb3J0IHsgU3BsVG9r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gICAgIGNyZWF0ZUNyZWF0ZU1ldGFkYXRhQWNjb3VudFYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBtZXRhZGF0YTogdG9rZW5NZXRhZGF0YVB1YmtleSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWV0YWRhdGFBY2NvdW50QXJnc1YzOiB7XG4gICAgICAgICAgICBkYXRhOiBuZnRNZXRhZGF0YSxcbiAgICAgICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25EZXRhaWxzOiBudWxsLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1hc3RlckVkaXRpb25WM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgZWRpdGlvbjogbWFzdGVyRWRpdGlvblB1YmtleSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIG1ldGFkYXRhOiB0b2tlbk1ldGFkYXRhUHVia2V5LFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWFzdGVyRWRpdGlvbkFyZ3M6IHtcbiAgICAgICAgICAgIG1heFN1cHBseTogMCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuICAgIHJldHVybiBpbnN0cnVjdGlvbnM7XG4gIH07XG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bHVlO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhyb3cgRXJyb3IoYE11c3Qgc2V0IGZpbGVQYXRoJyBvciAndXJpJ2ApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBkYXRhdjIgPSBDb252ZXJ0ZXIuUmVndWxhck5mdE1ldGFkYXRhLmludG9JbmZyYShcbiAgICAgICAgaW5wdXQsXG4gICAgICAgIHVyaSxcbiAgICAgICAgc2VsbGVyRmVlQmFzaXNQb2ludHMsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpc011dGFibGUgPSBpbnB1dC5pc011dGFibGUgPT09IHVuZGVmaW5lZCA/IHRydWUgOiBpbnB1dC5pc011dGFibGU7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGlucHV0OiAnLCBpbnB1dCk7XG4gICAgICBkZWJ1Z0xvZygnIyBkYXRhdjI6ICcsIGRhdGF2Mik7XG5cbiAgICAgIGNvbnN0IG1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG5cbiAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGF3YWl0IGNyZWF0ZU1pbnQoXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgLy8gY29sbGVjdGlvbiAtLS1cbiAgICAgIGlmIChpbnB1dC5jb2xsZWN0aW9uKSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZVZlcmlmeVNpemVkQ29sbGVjdGlvbihcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIGlucHV0LmNvbGxlY3Rpb24udG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBrZXlwYWlycyA9IFtzaWduZXIudG9LZXlwYWlyKCksIG1pbnQudG9LZXlwYWlyKCldO1xuXG4gICAgICAvLyBjcmVhdG9yIC0tLVxuICAgICAgaWYgKGlucHV0LmNyZWF0b3JzKSB7XG4gICAgICAgIGlucHV0LmNyZWF0b3JzLmZvckVhY2goKGNyZWF0b3IpID0+IHtcbiAgICAgICAgICBpZiAoQWNjb3VudC5LZXlwYWlyLmlzU2VjcmV0KGNyZWF0b3Iuc2VjcmV0KSkge1xuICAgICAgICAgICAgY29uc3QgY3JlYXRvclB1YmtleSA9IGNyZWF0b3IuYWRkcmVzcy50b1B1YmxpY0tleSgpO1xuICAgICAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZVZlcmlmeUNyZWF0b3IobWludC50b1B1YmxpY0tleSgpLCBjcmVhdG9yUHVia2V5KTtcbiAgICAgICAgICAgIGluc3RydWN0aW9ucy5wdXNoKGluc3QpO1xuICAgICAgICAgICAga2V5cGFpcnMucHVzaChjcmVhdG9yLnNlY3JldC50b0tleXBhaXIoKSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZ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gY29uc3QgaXNNdXRhYmxlID0gaW5wdXQuaXNNdXRhYmxlID09PSB1bmRlZmluZWQgPyB0cnVlIDogaW5wdXQuaXNNdXRhYmxlO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBpbnB1dDogJywgaW5wdXQpO1xuICAgICAgZGVidWdMb2coJyMgc2VsbGVyRmVlQmFzaXNQb2ludHM6ICcsIHNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgTWludC5jcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgZmVlUGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAob3B0aW9ucy5mcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHMucHVzaChcbiAgICAgICAgICBNaW50LmNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvcHRpb25zLmZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGJsb2NraGFzaE9iaiA9IGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldExhdGVzdEJsb2NraGFzaCgpO1xuICAgICAgY29uc3QgdHggPSBuZXcgVHJhbnNhY3Rpb24oe1xuICAgICAgICBsYX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XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB0aHJvdyBFcnJvcihgTXVzdCBzZXQgZmlsZVBhdGgnIG9yICd1cmknYCk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGRhdGF2MiA9IENvbnZlcnRlci5SZWd1bGFyTmZ0TWV0YWRhdGEuaW50b0luZnJhKGlucHV0LCB1cmksIDApO1xuXG4gICAgICBjb25zdCBpc011dGFibGUgPSBpbnB1dC5pc011dGFibGUgPT09IHVuZGVmaW5lZCA/IHRydWUgOiBpbnB1dC5pc011dGFibGU7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGlucHV0OiAnLCBpbnB1dCk7XG4gICAgICBkZWJ1Z0xvZygnIyBkYXRhdjI6ICcsIGRhdGF2Mik7XG5cbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25NaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgY29sbGVjdGlvbk1ldGFkYXRhQWNjb3VudCA9IEFjY291bnQuUGRhLmdldE1ldGFkYXRhKFxuICAgICAgICBjb2xsZWN0aW9uTWludC5wdWJrZXksXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhd2FpdCBNaW50LmNyZWF0ZU1pbnQoXG4gICAgICAgIGNvbGxlY3Rpb25NaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgTWludC5jcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25zID0ge1xuICAgICAgICBjb2xsZWN0aW9uTWV0YWRhdGE6IGNvbGxlY3Rpb25NZXRhZGF0YUFjY291bnQsXG4gICAgICAgIGNvbGxlY3Rpb25BdXRob3JpdHk6IHNpZ25lci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGNvbGxlY3Rpb25NaW50OiBjb2xsZWN0aW9uTWludC50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICB9O1xuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlU2V0Q29sbGVjdGlvblNpemVJbnN0cnVjdGlvbihjb2xsZWN0aW9ucywge1xuICAgICAgICAgIHNldENvbGxlY3Rpb25TaXplQXJnczoge1xuICAgICAgICAgICAgc2l6ZTogY29sbGVjdGlvblNpemUgfHwgREVGQVVMVF9DT0xMRUNUSU9OX1NJWkUsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSksXG4gICAgICApO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5NaW50KFxuICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgIFtzaWduZXIudG9LZXlwYWlyKCksIGNvbGxlY3Rpb25NaW50LnRvS2V5cGFpcigpXSxcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIGNvbGxlY3Rpb25NaW50LnB1YmtleSxcbiAgICAgICk7XG4gICAgfSk7XG4gIH07XG59XG4iLCAiaW1wb3J0IHsgUmVzdWx0LCBUcnkgfSBmcm9tICd+L3NoYXJlZCc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20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b24iLCAiY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uIiwgImNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbiIsICJDb252ZXJ0ZXIiLCAiVHJhbnNhY3Rpb24iLCAiUmVndWxhck5mdCIsICJDb252ZXJ0ZXIiLCAiQWNjb3VudCIsICJzaWduZXIiLCAiUmVndWxhck5mdCIsICJTcGxUb2tlbiIsICJSZWd1bGFyTmZ0IiwgIkNvbnZlcnRlciIsICJBY2NvdW50IiwgImdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jIiwgIlJlZ3VsYXJOZnQiLCAiQWNjb3VudCIsICJSZWd1bGFyTmZ0IiwgIlNwbFRva2VuIiwgIlJlZ3VsYXJOZnQiLCAiUGhhbnRvbU1ldGFwbGV4IiwgIkNvbnZlcnRlciIsICJtaW50IiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb24iLCAiUmVndWxhck5mdCIsICJzaWciLCAiY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uIiwgIlRPS0VOX1BST0dSQU1fSUQiLCAiVHJhbnNhY3Rpb24iLCAiUGhhbnRvbVNwbFRva2VuIiwgIlRyYW5zYWN0aW9uIiwgIkFjY291bnQiLCAiY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uIiwgIlRPS0VOX1BST0dSQU1fSUQiLCAiS2V5cGFpciIsICJUcmFuc2FjdGlvbiIsICJQaGFudG9tU3BsVG9rZW4iLCAiVHJhbnNhY3Rpb24iLCAibWludCIsICJLZXlwYWlyIiwgIkNvbnZlcnRlciIsICJTcGxUb2tlbiIsICJzaWciLCAiUGhhbnRvbVNwbFRva2VuIl0KfQo= \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4v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29uc3QgZmVlUGF5ZXJzID0gYXJyLmZpbHRlcigoYSkgPT4gYS5mZWVQYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXIucHVibGljS2V5O1xuICAgICAgICAgIGZpbmFsU2lnbmVycyA9IFtmZWVQYXllciwgLi4uc2lnbmVyc107XG4gICAgICAgIH1cbiAgICAgICAgaW5zdHJ1Y3Rpb25zLm1hcCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICAvLyBDYWxjdWxhdGVUeHNpemUuaXNNYXhUcmFuc2FjdGlvblNpemUodHJhbnNhY3Rpb24sIGZlZVBheWVyLnB1YmxpY0tleSk7XG5cbiAgICAgICAgY29uc3Qgb3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogTUFYX1JFVFJJRVMsXG4gICAgICAgIH07XG5cbiAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICk7XG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AgICAgICAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGluc3QpO1xuICAgICAgICAgICAgcmV0dXJuIGluc3Q7XG4gICAgICAgICAgfSBlbHNlIGlmIChpbnN0IGluc3RhbmNlb2YgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbikge1xuICAgICAgICAgICAgKGF3YWl0IGluc3Quc3VibWl0KCkpLm1hcChcbiAgICAgICAgICAgICAgYXN5bmMgKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZWF0ZSB0b2tlbiBhY2NvdW50OiBgLCBlKTtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyBtaW50OiAke21pbnR9LCBvd25lcjogJHtvd25lcn0sIGZlZVBheWVyOiAke2ZlZVBheWVyfWApO1xuICAgICAgICB9XG4gICAgICAgIGF3YWl0IHNsZWVwKFJFVFJZX1NMRUVQX1RJTUUpO1xuICAgICAgICBjb3VudGVyKys7XG4gICAgICB9XG4gICAgICB0aHJvdyBFcnJvcihgcmV0cnkgYWN0aW9uIGlzIG92ZXIgbGltaXQgJHtSRVRSWV9PVkVSX0xJTUlUfWApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICA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AgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgICBBU1NPQ0lBVEVEX1RPS0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JiBtZXRhZGF0YS5yb3lhbHR5KSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAg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1dCwgcHJvcGVydGllcyB9LFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG4gICAgICBjb25zdCB1cGxvYWRlZCA9IGF3YWl0IFN0b3JhZ2UudXBsb2FkKFxuICAgICAgICBuZnRTdG9yYWdlTWV0YWRhdGEsXG4gICAgICAgIGlucHV0LmZpbGVQYXRoLFxuICAgICAgICBpbnB1dC5zdG9yYWdlVHlwZSxcbiAgICAgICk7XG5cbiAgICAgIGlmICh1cGxvYWRlZC5pc0Vycikge1xuICAgICAgICB0aHJvdyB1cGxvYWRlZDtcbiAgICAgIH1cbiAgICAgIGNvbnN0IHVyaSA9IHVwbG9hZGVkLnZhbHVlO1xuXG4gICAgICBjb25zdCBkYXRhdjIgPSBDb252ZXJ0ZXIuUmVndWxhck5mdE1ldGFkYXRhLmludG9JbmZyYShcbiAgICAgICAgaW5wdXQsXG4gICAgICAgIHVyaSxcbiAgICAgICAgc2VsbGVyRmVlQmFzaXNQb2ludHMsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBjb25uZWN0aW9uID0gTm9kZS5nZXRDb25uZWN0aW9uKCk7XG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgaXNNdXRhYmxlID0gdHJ1ZTtcblxuICAgICAgZGVidWdMb2coJyMgcHJvcGVydGllczogJywgcHJvcGVydGllcyk7XG4gICAgICBkZWJ1Z0xvZygnIyBzZWxsZXJGZWVCYXNpc1BvaW50czogJywgc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgZGVidWdMb2coJyMgbWludDogJywgbWludC5wdWJrZXkpO1xuXG4gICAgICBjb25zdCB0eCA9IG5ldyBUcmFuc2FjdGlvbigpO1xuXG4gICAgICBjb25zdCBpbnN0cyA9IGF3YWl0IFJlZ3VsYXJOZnQuY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBwa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KHMpID0+IHMudG9LZXlwYWlyKCkpO1xuXG4gICAgICBjb25zdCB0b2tlbkFzc29jaWF0ZWQgPSBhd2FpdCBBY2NvdW50LkFzc29jaWF0ZWQucmV0cnlHZXRPckNyZWF0ZShcbiAgICAgICAgdG9rZW4sXG4gICAgICAgIG93bmVyLFxuICAgICAgICBwYXllcixcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBDYWxjdWxhdGUuY2FsY3VsYXRlQW1vdW50KHRvdGFsQW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBrZXlwYWlycyxcbiAgICAgICk7XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbjxQdWJrZXk+KFxuICAgICAgICBbaW5zdF0sXG4gICAgICAgIGtleXBhaXJzLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgdG9rZW4sXG4gICAgICApO1xuICAgIH0pO1xuICB9O1xufVxuIiwgIi8vQGludGVybmFsXG5leHBvcnQgbmFtZXNwYWNlIFNwbFRva2VuIHtcbiAgZXhwb3J0IGNvbnN0IGNhbGN1bGF0ZUFtb3VudCA9IChcbiAgICBhbW91bnQ6IG51bWJlcixcbiAgICBtaW50RGVjaW1hbDogbnVtYmVyLFxuICApOiBudW1iZXIgPT4ge1xuICAgIHJldHVybiBhbW91bnQgKiAxMCAqKiBtaW50RGVjaW1hbDtcbiAgfTtcbn1cbiIsICJpbXBvcnQge1xuICBjcmVhdGVCdXJuQ2hlY2tlZEluc3RydWN0aW9uLFxuICBnZXRBc3NvY2lhdGVkV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lbkFtb3VudC51aUFtb3VudCA8IDEpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhcbiAgICAgICAgICAgICcjIGZpbmRCeU93bmVyIG5vIGhvbGQgbWV0YWRhdGE6ICcsXG4gICAgICAgICAgICBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mbyxcbiAgICAgICAgICApO1xuICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IG1pbnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby5taW50IGFzIFB1YmtleTtcbiAgICAgICAgY29uc3QgdG9rZW5BbW91bnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby50b2tlbkFtb3VudFxuICAgICAgICAgIC5hbW91bnQgYXMgc3RyaW5nO1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgY29uc3QgbWV0YWRhdGEgPSBhd2FpdCBNZXRhZGF0YS5mcm9tQWNjb3VudEFkZHJlc3MoXG4gICAgICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICAgICAgQWNjb3VudC5QZGEuZ2V0TWV0YWRhdGEobWludCksXG4gICAgICAgICAgKTtcbiAgICAgICAgICBkZWJ1Z0xvZygnIyBmaW5kQnlPd25lciBtZXRhZGF0YTogJywgbWV0YWRhdGEpO1xuICAgICAgICAgIC8vIHRva2VuU3RhbmRhcmQ6IDAoTkZUKSBvciAyIChTUEwtVE9LRU4pXG4gICAgICAgICAgaWYgKG1ldGFkYXRhLnRva2VuU3RhbmRhcmQgIT09IHRva2VuU3RhbmRhcmQpIHtcbiAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgIH1cbiAgICAgICAgICBmZXRjaChtZXRhZGF0YS5kYXRhLnVyaSlcbiAgICAgICAgICAgIC50aGVuKChyZXNwb25zZSkgPT4ge1xuICAgICAgICAgICAgICByZXNwb25zZVxuICAgICAgICAgICAgICAgIC5qc29uKClcbiAgICAgICAgICAgICAgICAudGhlbigoanNvbjogT2ZmY2hhaW4pID0+IHtcbiAgICAgICAgICAgICAgICAgIGRhdGEucHVzaChcbiAgICAgICAgICAgICAgICAgICAgY29udmVydGVyPFQ+KHRva2VuU3RhbmRhcmQsIG1ldGFkYXRhLCBqc29uLCB0b2tlbkFtb3VudCksXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgY2FsbGJhY2soUmVzdWx0Lm9rKGRhdGEpKTsgLy8gbmVlZCB0aGlzIGNhbGwgP1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgLmNhdGNoKChlKSA9PiB7XG4gICAgICAgICAgICAgICAgICBjYWxsYmFjayhSZXN1bHQuZXJyKGUpKTtcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIC5maW5hbGx5KCgpID0+IHtcbiAgICAgICAgICAgICAgICAgIGNvbnN0IGRlc2NBbGdvID0gc29ydEJ5VWluaXhUaW1lc3RhbXA8VD4oU29ydERpcmVjdGlvbi5EZXNjKTtcbiAgICAgICAgICAgICAgICAgIGNvbnN0IGFzY0FsZ28gPSBzb3J0QnlVaW5peFRpbWVzdGFtcDxUPihTb3J0RGlyZWN0aW9uLkFzYyk7XG4gICAgICAgICAgICAgICAgICBpZiAoc29ydGFibGUgPT09IFNvcnREaXJlY3Rpb24uRGVzYykge1xuICAgICAgICAgICAgICAgICAgICBkYXRhID0gZGF0YS5zb3J0KGRlc2NBbGdvKTtcbiAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoc29ydGFibGUgPT09IFNvcnREaXJlY3Rpb24uQXNjKSB7XG4gICAgICAgICAgICAgICAgICAgIGRhdGEgPSBkYXRhLnNvcnQoYXNjQWxnbyk7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICBjYWxsYmFjayhSZXN1bHQub2soZGF0YSkpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIC5jYXRjaCgoZSkg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BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGRlc3RUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICBDYWxjdWxhdG9yLmNhbGN1bGF0ZUFtb3VudChhbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgICBbb3duZXIudG9LZXlwYWlyKCldLFxuICAgICAgICApO1xuICAgICAgICB0eC5hZGQoaW5zdDIpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgLy8gcmV0dXJuIGluc3RydWN0aW9uIGFuZCB1bmRlY2lkZWQgYXNzb2NpYXRlZCB0b2tlbiBhY2NvdW50XG4gICAgICAgIGluc3QyID0gY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgc291cmNlVG9rZW4udG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGRlc3RUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICBDYWxjdWxhdG9yLmNhbGN1bGF0ZUFtb3VudChhbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgICBbb3duZXIudG9LZXlwYWlyKCldLFxuICAgICAgICApO1xuICAgICAgICB0eC5hZGQoZGVzdFRva2VuLmluc3QpLmFkZChpbnN0Mik7XG4gICAgICB9XG5cbiAgICAgIHR4LnJlY2VudEJsb2NraGFzaCA9IGJsb2NraGFzaE9iai5ibG9ja2hhc2g7XG4gICAgICB0eC5wYXJ0aWFsU2lnbihvd25lci50b0tleXBhaXIoKSk7XG5cbiAgICAgIG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GFtcG9ydHMsXG4gICAgICAgIHByb2dyYW1JZDogVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgIH0pLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUluaXRpYWxpemVNaW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBvd25lcixcbiAgICAgICAgb3duZXIsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgZmVlUGF5ZXIsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG1pbnQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgQ2FsY3VsYXRlLmNhbGN1bGF0ZUFtb3VudCh0b3RhbEFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWV0YWRhdGFBY2NvdW50VjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIG1ldGFkYXRhOiBtZXRhZGF0YVBkYSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICB1cGR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Z0xvZygnIyB1cGxvYWQgY29udGVudCB1cmw6ICcsIHVyaSk7XG5cbiAgICAgIGNvbnN0IG1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG4gICAgICBjb25zdCBpbnN0cyA9IGF3YWl0IGNyZWF0ZU1pbnQoXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIHRvdGFsQW1vdW50LFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZUZyZWV6ZUF1dGhvcml0eShcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHMsXG4gICAgICAgIFtvd25lci50b0tleXBhaXIoKSwgbWludC50b0tleXBhaXIoKV0sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBtaW50LnB1YmtleSxcbiAgICAgICk7XG4gICAgfSk7XG4gIH07XG59XG4iLCAiaW1wb3J0IHsgQ29uc3RhbnRzLCBkZWJ1Z0xvZywgaXNCcm93c2VyLCBpc05vZGUgfSBmcm9tICd+L3NoYXJlZCc7XG5pbXBvcnQgeyBGaWxlVHlwZSwgSWRlbnRp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1hbDogbnVtYmVyLFxuICAgIG9wdGlvbnM6IFBhcnRpYWw8TWludE9wdGlvbnM+ID0ge30sXG4gICk6IFByb21pc2U8UmVzdWx0PENvbW1vblN0cnVjdHVyZSwgRXJyb3I+PiA9PiB7XG4gICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCBwYXllciA9IG9wdGlvbnMuZmVlUGF5ZXIgPyBvcHRpb25zLmZlZVBheWVyIDogb3duZXJPck11bHRpc2lnWzBdO1xuICAgICAgY29uc3Qga2V5cGFpcnMgPSBvd25lck9yTXVsdGlzaWcubWFwKChzKSA9PiBzLnRvS2V5cGFpcigpKTtcblxuICAgICAgY29uc3Qgc291cmNlVG9rZW4gPSBhd2FpdCBBY2NvdW50LkFzc29jaWF0ZWQucmV0cnlHZXRPckNyZWF0ZShcbiAgICAgICAgbWludCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIHBheWVyLFxuICAgICAgKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIG1pbnQsXG4gICAgICAgIGRlc3QsXG4gICAgICAgIHBheWVyLFxuICAgICAgKTtcblxuICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZVRyYW5zZmVyQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICBzb3VyY2VUb2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIGRlc3RUb2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBDYWxjdWxhdG9yLmNhbGN1bGF0ZUFtb3VudChhbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIGtleXBhaXJzLFxuICAgICAgKTtcblxuICAgICAgcmV0dXJuIG5ldyBUcm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BheWVyLFxuICAgICAgY29sbGVjdGlvbkF1dGhvcml0eTogZmVlUGF5ZXIsXG4gICAgfSk7XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IGNyZWF0ZU1pbnQgPSBhc3luYyAoXG4gICAgbWludDogUHVibGljS2V5LFxuICAgIG93bmVyOiBQdWJsaWNLZXksXG4gICAgbmZ0TWV0YWRhdGE6IERhdGFWMixcbiAgICBmZWVQYXllcjogUHVibGljS2V5LFxuICAgIGlzTXV0YWJsZTogYm9vbGVhbixcbiAgKTogUHJvbWlzZTxUcmFuc2FjdGlvbkluc3RydWN0aW9uW10+ID0+IHtcbiAgICBjb25zdCBhdGEgPSBnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyhtaW50LCBvd25lcik7XG4gICAgY29uc3QgdG9rZW5NZXRhZGF0YVB1YmtleSA9IEFjY291bnQuUGRhLmdldE1ldGFkYXRhKG1pbnQudG9TdHJpbmcoKSk7XG4gICAgY29uc3QgbWFzdGVyRWRpdGlvblB1YmtleSA9IEFjY291bnQuUGRhLmdldE1hc3RlckVkaXRpb24obWludC50b1N0cmluZygpKTtcbiAgICBjb25zdCBjb25uZWN0aW9uID0gTm9kZS5nZXRDb25uZWN0aW9uKCk7XG4gICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gW107XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIFN5c3RlbVByb2dyYW0uY3JlYXRlQWNjb3VudCh7XG4gICAgICAgIGZyb21QdWJrZXk6IGZlZVBheWVyLFxuICAgICAgICBuZXdBY2NvdW50UHVia2V5OiBtaW50LFxuICAgICAgICBsYW1wb3J0czogYXdhaXQgZ2V0TWluaW11bUJhbGFuY2VGb3JSZW50RXhlbXB0TWludChjb25uZWN0aW9uKSxcbiAgICAgICAgc3BhY2U6IE1JTlRfU0laRSxcbiAgICAgICAgcHJvZ3JhbUlkOiBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgfSksXG4gICAgKTtcblxuIC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ICAgICBtaW50LFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIG1ldGFkYXRhOiB0b2tlbk1ldGFkYXRhUHVia2V5LFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWFzdGVyRWRpdGlvbkFyZ3M6IHtcbiAgICAgICAgICAgIG1heFN1cHBseTogMCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuICAgIHJldHVybiBpbnN0cnVjdGlvbnM7XG4gIH07XG5cbiAgLyoqXG4gICAqIFVwbG9hZCBjb250ZW50IGFuZCBORlQgbWludFxuICAgKlxuICAgKiBAcGFyYW0ge1NlY3JldH0gb3duZXIgICAgICAgICAvLyBvd25lcidzIFNlY3JldFxuICAgKiBAcGFyYW0ge0lucHV0TmZ0TWV0YWRhdGF9IGlucHV0XG4gICAqIHtcbiAgICogICBuYW1lOiBzdHJpbmcgICAgICAgICAgICAgICAvLyBuZnQgY29udGVudCBuYW1lXG4gICAqICAgc3ltYm9sOiBzdHJpbmcgICAgICAgICAgICAgLy8gbmZ0IHRpY2tlciBzeW1ib2xcbiAgICogICBmaWxlUGF0aDogc3RyaW5nIHwgRmlsZSAgICAvLyBuZnQgdGlja2VyIHN5bWJvbFxuICAgKiAgIHJveWFsdHk6IG51bWJlciAgICAgICAgICAgIC8vIHJveWFsdHkgcGVyY2VudGFnZVxuICAgKiAgIHN0b3JhZ2VUeXBlOiAnYXJ3ZWF2ZSd8J25mdFN0b3JhZ2UnIC8vIERlY2VudHJhbGl6ZWQgc3RvcmFnZVxuICAgKiAgIGRlc2NyaXB0aW9uPzogc3RyaW5nICAgICAgIC8vIG5mdCBjb250ZW50IGRlc2NyaXB0aW9uXG4gICAqICAgZXh0ZXJuYWxfdXJsPzogc3RyaW5nICAgIC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ltYWdlID0geyBpbWFnZTogaW5wdXQudXJpIH07XG4gICAgICAgIGNvbnN0IHVwbG9hZGVkID0gYXdhaXQgU3RvcmFnZS51cGxvYWREYXRhKFxuICAgICAgICAgIHsgLi4uc3RvcmFnZU1ldGFkYXRhLCAuLi5pbWFnZSB9LFxuICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgIHBheWVyLFxuICAgICAgICApO1xuICAgICAgICBpZiAodXBsb2FkZWQuaXNFcnIpIHtcbiAgICAgICAgICB0aHJvdyB1cGxvYWRlZDtcbiAgICAgICAgfVxuICAgICAgICB1cmkgPSB1cGxvYWRlZC52YWx1ZTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHRocm93IEVycm9yKGBNdXN0IHNldCBmaWxlUGF0aCcgb3IgJ3VyaSdgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZGF0YXYyID0gQ29udmVydGVyLlJlZ3VsYXJOZnRNZXRhZGF0YS5pbnRvSW5mcmEoXG4gICAgICAgIGlucHV0LFxuICAgICAgICB1cmksXG4gICAgICAgIHNlbGxlckZlZUJhc2lzUG9pbnRzLFxuICAgICAgKTtcblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gaW5wdXQuaXNNdXRhYmxlID09PSB1bmRlZmluZWQgPyB0cnVlIDogaW5wdXQuaXNNdXRhYmxlO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBpbnB1dDogJywgaW5wdXQpO1xuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuXG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuXG4gICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgLy8gY29sbGVjdGlvbiAtLS1cbiAgICAgIGlmIChpbnB1dC5jb2xsZWN0aW9uKSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZVZlcmlmeVNpemVkQ29sbGVjdGlvbihcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIGlucHV0LmNvbGxlY3Rpb24udG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBrZXlwYWlycyA9IFtvd25lci50b0tleXBhaXIoKSwgbWludC50b0tleXBhaXIoKV07XG5cbiAgICAgIC8vIGNyZWF0b3IgLS0tXG4gICAgICBpZiAoaW5wdXQuY3JlYXRvcnMpIHtcbiAgICAgICAgaW5wdXQuY3JlYXRvcnMuZm9yRWFjaCgoY3JlYXRvcikgPT4ge1xuICAgICAgICAgIGlmIChBY2NvdW50LktleXBhaXIuaXNTZWNyZXQoY3JlYXRvci5zZWNyZXQpKSB7XG4gICAgICAgICAgICBjb25zdCBjcmVhdG9yUHVia2V5ID0gY3JlYXRvci5hZGRyZXNzL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ksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIE1pbnQuY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgY29sbGVjdGlvbk1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgY29sbGVjdGlvbnMgPSB7XG4gICAgICAgIGNvbGxlY3Rpb25NZXRhZGF0YTogY29sbGVjdGlvbk1ldGFkYXRhQWNjb3VudCxcbiAgICAgICAgY29sbGVjdGlvbkF1dGhvcml0eTogb3duZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBjb2xsZWN0aW9uTWludDogY29sbGVjdGlvbk1pbnQudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgfTtcblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZVNldENvbGxlY3Rpb25TaXplSW5zdHJ1Y3Rpb24oY29sbGVjdGlvbnMsIHtcbiAgICAgICAgICBzZXRDb2xsZWN0aW9uU2l6ZUFyZ3M6IHtcbiAgICAgICAgICAgIHNpemU6IGNvbGxlY3Rpb25TaXplIHx8IERFRkFVTFRfQ09MTEVDVElPTl9TSVpFLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0pLFxuICAgICAgKTtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlv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X0lEIiwgIlRyYW5zYWN0aW9uIiwgIlBoYW50b21TcGxUb2tlbiIsICJUcmFuc2FjdGlvbiIsICJBY2NvdW50IiwgImNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbiIsICJUT0tFTl9QUk9HUkFNX0lEIiwgIktleXBhaXIiLCAiVHJhbnNhY3Rpb24iLCAiUGhhbnRvbVNwbFRva2VuIiwgIlRyYW5zYWN0aW9uIiwgIm1pbnQiLCAiS2V5cGFpciIsICJDb252ZXJ0ZXIiLCAiU3BsVG9rZW4iLCAic2lnIiwgIlBoYW50b21TcGxUb2tlbiJdCn0K \ No newline at end of file diff --git a/packages/suite-phantom/src/regular-nft/mint.ts b/packages/suite-phantom/src/regular-nft/mint.ts index 194399cc2..a23e282a9 100644 --- a/packages/suite-phantom/src/regular-nft/mint.ts +++ b/packages/suite-phantom/src/regular-nft/mint.ts @@ -41,7 +41,8 @@ export namespace PhantomMetaplex { input.storageType, ); - const sellerFeeBasisPoints = Converter.Royalty.intoInfra(input.royalty); + const royalty = input.royalty ? input.royalty : 0; + const sellerFeeBasisPoints = Converter.Royalty.intoInfra(royalty); const nftStorageMetadata = Storage.toConvertOffchaindata( { ...input, properties }, sellerFeeBasisPoints, diff --git a/packages/suite-regular-nft/dist/index.d.mts b/packages/suite-regular-nft/dist/index.d.mts index c7fad7605..034e4d97c 100644 --- a/packages/suite-regular-nft/dist/index.d.mts +++ b/packages/suite-regular-nft/dist/index.d.mts @@ -6,14 +6,14 @@ import BN from 'bn.js'; declare const pubKeyNominality: unique symbol; declare const secretNominality: unique symbol; -type Pubkey$1 = (string & { +type Pubkey = (string & { [pubKeyNominality]: never; }) | string; type Secret = (string & { [secretNominality]: never; }) | string; type KeypairAccount = { - pubkey: Pubkey$1; + pubkey: Pubkey; secret: Secret; }; type OwnerInfo = { @@ -29,13 +29,13 @@ declare enum SortDirection { type Find = { sol?: string; account?: string; - destination?: Pubkey$1; - source?: Pubkey$1; - authority?: Pubkey$1; - multisigAuthority?: Pubkey$1; - signers?: Pubkey$1[]; - mint?: Pubkey$1; - mintAuthority?: Pubkey$1; + destination?: Pubkey; + source?: Pubkey; + authority?: Pubkey; + multisigAuthority?: Pubkey; + signers?: Pubkey[]; + mint?: Pubkey; + mintAuthority?: Pubkey; tokenAmount?: string; memo?: string; dateTime?: Date; @@ -47,13 +47,13 @@ type Find = { type History = { sol?: string; account?: string; - destination?: Pubkey$1; - source?: Pubkey$1; - authority?: Pubkey$1; - multisigAuthority?: Pubkey$1; - signers?: Pubkey$1[]; - mint?: Pubkey$1; - mintAuthority?: Pubkey$1; + destination?: Pubkey; + source?: Pubkey; + authority?: Pubkey; + multisigAuthority?: Pubkey; + signers?: Pubkey[]; + mint?: Pubkey; + mintAuthority?: Pubkey; tokenAmount?: string; memo?: string; dateTime?: Date; @@ -65,134 +65,6 @@ type History = { type OnOk = (ok: T[]) => void; type OnErr = (err: Error) => void; -type bignum = number | BN; -type Option = T | null; -declare enum UseMethod { - Burn = 0, - Multiple = 1, - Single = 2 -} -type Uses = { - useMethod: UseMethod; - remaining: bignum; - total: bignum; -}; -type Creators = { - address: Pubkey$1; - share: number; - verified: boolean; -}; -type InputCreators = { - address: Pubkey$1; - secret: Secret; - share: number; -}; - -type GasLessMintOptions = { - freezeAuthority: Pubkey$1; -}; - -type FileType = string | File; - -type StorageType = 'nftStorage' | 'arweave' | string; -type Offchain = { - name?: string; - symbol?: string; - description?: string; - seller_fee_basis_points?: number; - image?: string; - external_url?: string; - attributes?: Attribute[]; - properties?: Properties; - collection?: { - name?: string; - family?: string; - [key: string]: unknown; - }; - collectionDetails?: { - kind: string; - size: number; - }; - created_at?: number; -}; -type Properties = { - creators?: { - address?: string; - share?: number; - [key: string]: unknown; - }[]; - files?: { - type?: string; - filePath?: FileType; - [key: string]: unknown; - }[]; - [key: string]: unknown; -}; -type Attribute = { - trait_type?: string; - value?: string; - [key: string]: unknown; -}; - -type Collection = { - address: Pubkey$1; - verified: boolean; -}; -type CollectionDetails = { - __kind: string; - size: number; -}; -type RegularNftMetadata = { - mint: string; - updateAuthority: string; - royalty: number; - name: string; - symbol: string; - uri: string; - isMutable: boolean; - primarySaleHappened: boolean; - editionNonce: Option; - offchain: Offchain; - collection?: Collection | undefined; - collectionDetails?: CollectionDetails | undefined; - creators?: Creators[] | undefined; - uses?: Uses | undefined; - dateTime?: Date | undefined; -}; - -type InputCollection = Pubkey$1; -type Options = { - [key: string]: unknown; -}; -type InputNftMetadata = { - name: string; - symbol: string; - royalty?: number; - storageType?: StorageType; - filePath?: FileType; - uri?: string; - isMutable?: boolean; - description?: string; - external_url?: string; - attributes?: Attribute[]; - properties?: Properties; - maxSupply?: bignum; - creators?: InputCreators[]; - uses?: Uses; - collection?: InputCollection; - options?: Options; -}; -type MintOptions = { - freezeAuthority: Pubkey$1; - feePayer: Secret; -}; - -type MintCollectionOptions = { - feePayer: Secret; - freezeAuthority: Pubkey$1; - collectionSize: number; -}; - declare abstract class AbstractResult { protected abstract _chain(ok: (value: T) => Result, err: (error: E) => Result): Result; unwrap(): T; @@ -500,7 +372,7 @@ declare namespace Account$3 { * @param {Secret} feePayer * @returns Promise */ - const retryGetOrCreate: (mint: Pubkey$1, owner: Pubkey$1, feePayer: Secret) => Promise; + const retryGetOrCreate: (mint: Pubkey, owner: Pubkey, feePayer: Secret) => Promise; /** * [Main logic]Get Associated token Account. * if not created, create new token accouint @@ -510,7 +382,7 @@ declare namespace Account$3 { * @param {Pubkey} feePayer * @returns Promise */ - const makeOrCreateInstruction: (mint: Pubkey$1, owner: Pubkey$1, feePayer?: Pubkey$1, allowOwnerOffCurve?: boolean) => Promise<{ + const makeOrCreateInstruction: (mint: Pubkey, owner: Pubkey, feePayer?: Pubkey, allowOwnerOffCurve?: boolean) => Promise<{ tokenAccount: string; inst: TransactionInstruction | undefined; }>; @@ -520,14 +392,14 @@ declare namespace Account$3 { declare namespace Account$2 { class Keypair { secret: Secret; - pubkey: Pubkey$1; + pubkey: Pubkey; constructor(params: { - pubkey?: Pubkey$1; + pubkey?: Pubkey; secret: Secret; }); toPublicKey(): PublicKey; toKeypair(): Keypair; - static isPubkey: (value: string) => value is Pubkey$1; + static isPubkey: (value: string) => value is Pubkey; static isSecret: (value: string) => value is Secret; static create: () => Keypair; static toKeyPair: (keypair: Keypair) => Keypair; @@ -536,11 +408,11 @@ declare namespace Account$2 { declare namespace Account$1 { namespace Pda { - const getMetadata: (address: Pubkey$1) => PublicKey; - const getMasterEdition: (address: Pubkey$1) => PublicKey; - const getTreeAuthority: (address: Pubkey$1) => PublicKey; + const getMetadata: (address: Pubkey) => PublicKey; + const getMasterEdition: (address: Pubkey) => PublicKey; + const getTreeAuthority: (address: Pubkey) => PublicKey; const getBgumSigner: () => PublicKey; - const getAssetId: (address: Pubkey$1, leafIndex: number) => Pubkey$1; + const getAssetId: (address: Pubkey, leafIndex: number) => Pubkey; } } @@ -572,6 +444,146 @@ interface Details { limit?: Limit; } +type BurnOptions = { + feePayer: Secret; +}; + +type bignum = number | BN; +type Option = T | null; +declare enum UseMethod { + Burn = 0, + Multiple = 1, + Single = 2 +} +type Uses = { + useMethod: UseMethod; + remaining: bignum; + total: bignum; +}; +type Creators = { + address: Pubkey; + share: number; + verified: boolean; +}; +type InputCreators = { + address: Pubkey; + secret: Secret; + share: number; +}; + +type GasLessMintOptions = { + freezeAuthority: Pubkey; +}; + +type FileType = string | File; + +type StorageType = 'nftStorage' | 'arweave' | string; +type Offchain = { + name?: string; + symbol?: string; + description?: string; + seller_fee_basis_points?: number; + image?: string; + external_url?: string; + attributes?: Attribute[]; + properties?: Properties; + collection?: { + name?: string; + family?: string; + [key: string]: unknown; + }; + collectionDetails?: { + kind: string; + size: number; + }; + created_at?: number; +}; +type Properties = { + creators?: { + address?: string; + share?: number; + [key: string]: unknown; + }[]; + files?: { + type?: string; + filePath?: FileType; + [key: string]: unknown; + }[]; + [key: string]: unknown; +}; +type Attribute = { + trait_type?: string; + value?: string; + [key: string]: unknown; +}; + +type Collection = { + address: Pubkey; + verified: boolean; +}; +type CollectionDetails = { + __kind: string; + size: number; +}; +type RegularNftMetadata = { + mint: string; + updateAuthority: string; + royalty: number; + name: string; + symbol: string; + uri: string; + isMutable: boolean; + primarySaleHappened: boolean; + editionNonce: Option; + offchain: Offchain; + collection?: Collection | undefined; + collectionDetails?: CollectionDetails | undefined; + creators?: Creators[] | undefined; + uses?: Uses | undefined; + dateTime?: Date | undefined; +}; + +type InputCollection = Pubkey; +type Options = { + [key: string]: unknown; +}; +type InputNftMetadata = { + name: string; + symbol: string; + royalty?: number; + storageType?: StorageType; + filePath?: FileType; + uri?: string; + isMutable?: boolean; + description?: string; + external_url?: string; + attributes?: Attribute[]; + properties?: Properties; + maxSupply?: bignum; + creators?: InputCreators[]; + uses?: Uses; + collection?: InputCollection; + options?: Options; +}; +type MintOptions = { + freezeAuthority: Pubkey; + feePayer: Secret; +}; + +type MintCollectionOptions = { + feePayer: Secret; + freezeAuthority: Pubkey; + collectionSize: number; +}; + +type ThawOptions = { + feePayer: Secret; +}; + +type TransferOptions = { + feePayer: Secret; +}; + declare namespace Validator { export namespace Message { const SUCCESS = "success"; @@ -668,8 +680,8 @@ type WithMemo = { type Transfer = { parsed: { info: { - destination: Pubkey$1; - source: Pubkey$1; + destination: Pubkey; + source: Pubkey; lamports: number; }; type: string; @@ -680,9 +692,9 @@ type Transfer = { type MintTo = { parsed: { info: { - account: Pubkey$1; - mint: Pubkey$1; - mintAuthority: Pubkey$1; + account: Pubkey; + mint: Pubkey; + mintAuthority: Pubkey; tokenAmount: string; }; type: string; @@ -694,11 +706,11 @@ type MintToChecked = MintTo; type TransferChecked = { parsed: { info: { - destination: Pubkey$1; - mint: Pubkey$1; - multisigAuthority: Pubkey$1; - signers: Pubkey$1[]; - source: Pubkey$1; + destination: Pubkey; + mint: Pubkey; + multisigAuthority: Pubkey; + signers: Pubkey[]; + source: Pubkey; tokenAmount: string; }; type: string; @@ -720,7 +732,7 @@ type CommonStructure = { data?: T; submit: () => Promise>; }; -type MintStructure = { +type MintStructure = { instructions: TransactionInstruction[]; signers: Keypair[]; data: T; @@ -728,7 +740,7 @@ type MintStructure = { canSubmit?: boolean; submit: () => Promise>; }; -type PartialSignStructure = { +type PartialSignStructure = { hexInstruction: string; canSubmit?: boolean; data?: T; @@ -736,24 +748,24 @@ type PartialSignStructure = { }; declare const RegularNft: { - transfer: (mint: Pubkey$1, owner: Pubkey$1, dest: Pubkey$1, signers: Secret[], options?: AuthorityOptions) => Promise>; - thaw: (mint: Pubkey$1, owner: Pubkey$1, freezeAuthority: Secret, options?: AuthorityOptions) => Result, Error>; + transfer: (mint: Pubkey, owner: Pubkey, dest: Pubkey, ownerOrMultisig: Secret[], options?: Partial) => Promise>; + thaw: (mint: Pubkey, owner: Pubkey, freezeAuthority: Secret, options?: Partial) => Result, Error>; DEFAULT_COLLECTION_SIZE: 0; - mintCollection: (owner: Pubkey, signer: Secret, input: InputNftMetadata, options?: Partial) => Promise>; + mintCollection: (owner: Secret, input: InputNftMetadata, options?: Partial) => Promise>; createVerifyCreator: (mint: _solana_web3_js.PublicKey, creator: _solana_web3_js.PublicKey) => _solana_web3_js.TransactionInstruction; createDeleagate: (mint: _solana_web3_js.PublicKey, owner: _solana_web3_js.PublicKey, delegateAuthority: _solana_web3_js.PublicKey) => _solana_web3_js.TransactionInstruction; createVerifySizedCollection: (collectionChild: _solana_web3_js.PublicKey, collectionParent: _solana_web3_js.PublicKey, feePayer: _solana_web3_js.PublicKey) => _solana_web3_js.TransactionInstruction; createMint: (mint: _solana_web3_js.PublicKey, owner: _solana_web3_js.PublicKey, nftMetadata: _metaplex_foundation_mpl_token_metadata.DataV2, feePayer: _solana_web3_js.PublicKey, isMutable: boolean) => Promise<_solana_web3_js.TransactionInstruction[]>; - mint: (owner: Pubkey$1, signer: Secret, input: InputNftMetadata, options?: Partial) => Promise>; - gasLessTransfer: (mint: Pubkey$1, owner: Pubkey$1, dest: Pubkey$1, signers: Secret[], feePayer: Pubkey$1) => Promise>; - gasLessMint: (owner: Pubkey$1, signer: Secret, input: InputNftMetadata, feePayer: Pubkey$1, options?: Partial) => Promise>; - freeze: (mint: Pubkey$1, owner: Pubkey$1, freezeAuthority: Secret, options?: AuthorityOptions) => Result; - findByOwner: (owner: Pubkey$1, onOk: OnOk, onErr: OnErr, options?: { + mint: (owner: Secret, input: InputNftMetadata, options?: Partial) => Promise>; + gasLessTransfer: (mint: Pubkey, owner: Secret, dest: Pubkey, feePayer: Pubkey) => Promise>; + gasLessMint: (owner: Secret, input: InputNftMetadata, feePayer: Pubkey, options?: Partial) => Promise>; + freeze: (mint: Pubkey, owner: Pubkey, freezeAuthority: Secret, options?: AuthorityOptions) => Result; + findByOwner: (owner: Pubkey, onOk: OnOk, onErr: OnErr, options?: { sortable?: SortDirection | undefined; isHolder?: boolean | undefined; } | undefined) => Promise; - findByMint: (mint: Pubkey$1) => Promise>; - burn: (mint: Pubkey$1, owner: Pubkey$1, signer: Secret, options?: AuthorityOptions) => Result; + findByMint: (mint: Pubkey) => Promise>; + burn: (mint: Pubkey, owner: Pubkey, ownerOrMultisig: Secret[], options?: Partial) => Result; }; -export { Account, Explorer, ExplorerOptions, FilterOptions, FilterType, KeypairAccount, Memo, MintTo, MintToChecked, ModuleName, Node, OwnerInfo, PostTokenAccount, Pubkey$1 as Pubkey, RegularNft, Secret, Transfer, TransferChecked, Try, Validator, ValidatorError, WithMemo, bufferToArray, convertTimestampToDateTime, debugLog, isBrowser, isNode, isPromise, overwriteObject, sleep, unixTimestamp }; +export { Account, Explorer, ExplorerOptions, FilterOptions, FilterType, KeypairAccount, Memo, MintTo, MintToChecked, ModuleName, Node, OwnerInfo, PostTokenAccount, Pubkey, RegularNft, Secret, Transfer, TransferChecked, Try, Validator, ValidatorError, WithMemo, bufferToArray, convertTimestampToDateTime, debugLog, isBrowser, isNode, isPromise, overwriteObject, sleep, unixTimestamp }; diff --git a/packages/suite-regular-nft/dist/index.d.ts b/packages/suite-regular-nft/dist/index.d.ts index c7fad7605..034e4d97c 100644 --- a/packages/suite-regular-nft/dist/index.d.ts +++ b/packages/suite-regular-nft/dist/index.d.ts @@ -6,14 +6,14 @@ import BN from 'bn.js'; declare const pubKeyNominality: unique symbol; declare const secretNominality: unique symbol; -type Pubkey$1 = (string & { +type Pubkey = (string & { [pubKeyNominality]: never; }) | string; type Secret = (string & { [secretNominality]: never; }) | string; type KeypairAccount = { - pubkey: Pubkey$1; + pubkey: Pubkey; secret: Secret; }; type OwnerInfo = { @@ -29,13 +29,13 @@ declare enum SortDirection { type Find = { sol?: string; account?: string; - destination?: Pubkey$1; - source?: Pubkey$1; - authority?: Pubkey$1; - multisigAuthority?: Pubkey$1; - signers?: Pubkey$1[]; - mint?: Pubkey$1; - mintAuthority?: Pubkey$1; + destination?: Pubkey; + source?: Pubkey; + authority?: Pubkey; + multisigAuthority?: Pubkey; + signers?: Pubkey[]; + mint?: Pubkey; + mintAuthority?: Pubkey; tokenAmount?: string; memo?: string; dateTime?: Date; @@ -47,13 +47,13 @@ type Find = { type History = { sol?: string; account?: string; - destination?: Pubkey$1; - source?: Pubkey$1; - authority?: Pubkey$1; - multisigAuthority?: Pubkey$1; - signers?: Pubkey$1[]; - mint?: Pubkey$1; - mintAuthority?: Pubkey$1; + destination?: Pubkey; + source?: Pubkey; + authority?: Pubkey; + multisigAuthority?: Pubkey; + signers?: Pubkey[]; + mint?: Pubkey; + mintAuthority?: Pubkey; tokenAmount?: string; memo?: string; dateTime?: Date; @@ -65,134 +65,6 @@ type History = { type OnOk = (ok: T[]) => void; type OnErr = (err: Error) => void; -type bignum = number | BN; -type Option = T | null; -declare enum UseMethod { - Burn = 0, - Multiple = 1, - Single = 2 -} -type Uses = { - useMethod: UseMethod; - remaining: bignum; - total: bignum; -}; -type Creators = { - address: Pubkey$1; - share: number; - verified: boolean; -}; -type InputCreators = { - address: Pubkey$1; - secret: Secret; - share: number; -}; - -type GasLessMintOptions = { - freezeAuthority: Pubkey$1; -}; - -type FileType = string | File; - -type StorageType = 'nftStorage' | 'arweave' | string; -type Offchain = { - name?: string; - symbol?: string; - description?: string; - seller_fee_basis_points?: number; - image?: string; - external_url?: string; - attributes?: Attribute[]; - properties?: Properties; - collection?: { - name?: string; - family?: string; - [key: string]: unknown; - }; - collectionDetails?: { - kind: string; - size: number; - }; - created_at?: number; -}; -type Properties = { - creators?: { - address?: string; - share?: number; - [key: string]: unknown; - }[]; - files?: { - type?: string; - filePath?: FileType; - [key: string]: unknown; - }[]; - [key: string]: unknown; -}; -type Attribute = { - trait_type?: string; - value?: string; - [key: string]: unknown; -}; - -type Collection = { - address: Pubkey$1; - verified: boolean; -}; -type CollectionDetails = { - __kind: string; - size: number; -}; -type RegularNftMetadata = { - mint: string; - updateAuthority: string; - royalty: number; - name: string; - symbol: string; - uri: string; - isMutable: boolean; - primarySaleHappened: boolean; - editionNonce: Option; - offchain: Offchain; - collection?: Collection | undefined; - collectionDetails?: CollectionDetails | undefined; - creators?: Creators[] | undefined; - uses?: Uses | undefined; - dateTime?: Date | undefined; -}; - -type InputCollection = Pubkey$1; -type Options = { - [key: string]: unknown; -}; -type InputNftMetadata = { - name: string; - symbol: string; - royalty?: number; - storageType?: StorageType; - filePath?: FileType; - uri?: string; - isMutable?: boolean; - description?: string; - external_url?: string; - attributes?: Attribute[]; - properties?: Properties; - maxSupply?: bignum; - creators?: InputCreators[]; - uses?: Uses; - collection?: InputCollection; - options?: Options; -}; -type MintOptions = { - freezeAuthority: Pubkey$1; - feePayer: Secret; -}; - -type MintCollectionOptions = { - feePayer: Secret; - freezeAuthority: Pubkey$1; - collectionSize: number; -}; - declare abstract class AbstractResult { protected abstract _chain(ok: (value: T) => Result, err: (error: E) => Result): Result; unwrap(): T; @@ -500,7 +372,7 @@ declare namespace Account$3 { * @param {Secret} feePayer * @returns Promise */ - const retryGetOrCreate: (mint: Pubkey$1, owner: Pubkey$1, feePayer: Secret) => Promise; + const retryGetOrCreate: (mint: Pubkey, owner: Pubkey, feePayer: Secret) => Promise; /** * [Main logic]Get Associated token Account. * if not created, create new token accouint @@ -510,7 +382,7 @@ declare namespace Account$3 { * @param {Pubkey} feePayer * @returns Promise */ - const makeOrCreateInstruction: (mint: Pubkey$1, owner: Pubkey$1, feePayer?: Pubkey$1, allowOwnerOffCurve?: boolean) => Promise<{ + const makeOrCreateInstruction: (mint: Pubkey, owner: Pubkey, feePayer?: Pubkey, allowOwnerOffCurve?: boolean) => Promise<{ tokenAccount: string; inst: TransactionInstruction | undefined; }>; @@ -520,14 +392,14 @@ declare namespace Account$3 { declare namespace Account$2 { class Keypair { secret: Secret; - pubkey: Pubkey$1; + pubkey: Pubkey; constructor(params: { - pubkey?: Pubkey$1; + pubkey?: Pubkey; secret: Secret; }); toPublicKey(): PublicKey; toKeypair(): Keypair; - static isPubkey: (value: string) => value is Pubkey$1; + static isPubkey: (value: string) => value is Pubkey; static isSecret: (value: string) => value is Secret; static create: () => Keypair; static toKeyPair: (keypair: Keypair) => Keypair; @@ -536,11 +408,11 @@ declare namespace Account$2 { declare namespace Account$1 { namespace Pda { - const getMetadata: (address: Pubkey$1) => PublicKey; - const getMasterEdition: (address: Pubkey$1) => PublicKey; - const getTreeAuthority: (address: Pubkey$1) => PublicKey; + const getMetadata: (address: Pubkey) => PublicKey; + const getMasterEdition: (address: Pubkey) => PublicKey; + const getTreeAuthority: (address: Pubkey) => PublicKey; const getBgumSigner: () => PublicKey; - const getAssetId: (address: Pubkey$1, leafIndex: number) => Pubkey$1; + const getAssetId: (address: Pubkey, leafIndex: number) => Pubkey; } } @@ -572,6 +444,146 @@ interface Details { limit?: Limit; } +type BurnOptions = { + feePayer: Secret; +}; + +type bignum = number | BN; +type Option = T | null; +declare enum UseMethod { + Burn = 0, + Multiple = 1, + Single = 2 +} +type Uses = { + useMethod: UseMethod; + remaining: bignum; + total: bignum; +}; +type Creators = { + address: Pubkey; + share: number; + verified: boolean; +}; +type InputCreators = { + address: Pubkey; + secret: Secret; + share: number; +}; + +type GasLessMintOptions = { + freezeAuthority: Pubkey; +}; + +type FileType = string | File; + +type StorageType = 'nftStorage' | 'arweave' | string; +type Offchain = { + name?: string; + symbol?: string; + description?: string; + seller_fee_basis_points?: number; + image?: string; + external_url?: string; + attributes?: Attribute[]; + properties?: Properties; + collection?: { + name?: string; + family?: string; + [key: string]: unknown; + }; + collectionDetails?: { + kind: string; + size: number; + }; + created_at?: number; +}; +type Properties = { + creators?: { + address?: string; + share?: number; + [key: string]: unknown; + }[]; + files?: { + type?: string; + filePath?: FileType; + [key: string]: unknown; + }[]; + [key: string]: unknown; +}; +type Attribute = { + trait_type?: string; + value?: string; + [key: string]: unknown; +}; + +type Collection = { + address: Pubkey; + verified: boolean; +}; +type CollectionDetails = { + __kind: string; + size: number; +}; +type RegularNftMetadata = { + mint: string; + updateAuthority: string; + royalty: number; + name: string; + symbol: string; + uri: string; + isMutable: boolean; + primarySaleHappened: boolean; + editionNonce: Option; + offchain: Offchain; + collection?: Collection | undefined; + collectionDetails?: CollectionDetails | undefined; + creators?: Creators[] | undefined; + uses?: Uses | undefined; + dateTime?: Date | undefined; +}; + +type InputCollection = Pubkey; +type Options = { + [key: string]: unknown; +}; +type InputNftMetadata = { + name: string; + symbol: string; + royalty?: number; + storageType?: StorageType; + filePath?: FileType; + uri?: string; + isMutable?: boolean; + description?: string; + external_url?: string; + attributes?: Attribute[]; + properties?: Properties; + maxSupply?: bignum; + creators?: InputCreators[]; + uses?: Uses; + collection?: InputCollection; + options?: Options; +}; +type MintOptions = { + freezeAuthority: Pubkey; + feePayer: Secret; +}; + +type MintCollectionOptions = { + feePayer: Secret; + freezeAuthority: Pubkey; + collectionSize: number; +}; + +type ThawOptions = { + feePayer: Secret; +}; + +type TransferOptions = { + feePayer: Secret; +}; + declare namespace Validator { export namespace Message { const SUCCESS = "success"; @@ -668,8 +680,8 @@ type WithMemo = { type Transfer = { parsed: { info: { - destination: Pubkey$1; - source: Pubkey$1; + destination: Pubkey; + source: Pubkey; lamports: number; }; type: string; @@ -680,9 +692,9 @@ type Transfer = { type MintTo = { parsed: { info: { - account: Pubkey$1; - mint: Pubkey$1; - mintAuthority: Pubkey$1; + account: Pubkey; + mint: Pubkey; + mintAuthority: Pubkey; tokenAmount: string; }; type: string; @@ -694,11 +706,11 @@ type MintToChecked = MintTo; type TransferChecked = { parsed: { info: { - destination: Pubkey$1; - mint: Pubkey$1; - multisigAuthority: Pubkey$1; - signers: Pubkey$1[]; - source: Pubkey$1; + destination: Pubkey; + mint: Pubkey; + multisigAuthority: Pubkey; + signers: Pubkey[]; + source: Pubkey; tokenAmount: string; }; type: string; @@ -720,7 +732,7 @@ type CommonStructure = { data?: T; submit: () => Promise>; }; -type MintStructure = { +type MintStructure = { instructions: TransactionInstruction[]; signers: Keypair[]; data: T; @@ -728,7 +740,7 @@ type MintStructure = { canSubmit?: boolean; submit: () => Promise>; }; -type PartialSignStructure = { +type PartialSignStructure = { hexInstruction: string; canSubmit?: boolean; data?: T; @@ -736,24 +748,24 @@ type PartialSignStructure = { }; declare const RegularNft: { - transfer: (mint: Pubkey$1, owner: Pubkey$1, dest: Pubkey$1, signers: Secret[], options?: AuthorityOptions) => Promise>; - thaw: (mint: Pubkey$1, owner: Pubkey$1, freezeAuthority: Secret, options?: AuthorityOptions) => Result, Error>; + transfer: (mint: Pubkey, owner: Pubkey, dest: Pubkey, ownerOrMultisig: Secret[], options?: Partial) => Promise>; + thaw: (mint: Pubkey, owner: Pubkey, freezeAuthority: Secret, options?: Partial) => Result, Error>; DEFAULT_COLLECTION_SIZE: 0; - mintCollection: (owner: Pubkey, signer: Secret, input: InputNftMetadata, options?: Partial) => Promise>; + mintCollection: (owner: Secret, input: InputNftMetadata, options?: Partial) => Promise>; createVerifyCreator: (mint: _solana_web3_js.PublicKey, creator: _solana_web3_js.PublicKey) => _solana_web3_js.TransactionInstruction; createDeleagate: (mint: _solana_web3_js.PublicKey, owner: _solana_web3_js.PublicKey, delegateAuthority: _solana_web3_js.PublicKey) => _solana_web3_js.TransactionInstruction; createVerifySizedCollection: (collectionChild: _solana_web3_js.PublicKey, collectionParent: _solana_web3_js.PublicKey, feePayer: _solana_web3_js.PublicKey) => _solana_web3_js.TransactionInstruction; createMint: (mint: _solana_web3_js.PublicKey, owner: _solana_web3_js.PublicKey, nftMetadata: _metaplex_foundation_mpl_token_metadata.DataV2, feePayer: _solana_web3_js.PublicKey, isMutable: boolean) => Promise<_solana_web3_js.TransactionInstruction[]>; - mint: (owner: Pubkey$1, signer: Secret, input: InputNftMetadata, options?: Partial) => Promise>; - gasLessTransfer: (mint: Pubkey$1, owner: Pubkey$1, dest: Pubkey$1, signers: Secret[], feePayer: Pubkey$1) => Promise>; - gasLessMint: (owner: Pubkey$1, signer: Secret, input: InputNftMetadata, feePayer: Pubkey$1, options?: Partial) => Promise>; - freeze: (mint: Pubkey$1, owner: Pubkey$1, freezeAuthority: Secret, options?: AuthorityOptions) => Result; - findByOwner: (owner: Pubkey$1, onOk: OnOk, onErr: OnErr, options?: { + mint: (owner: Secret, input: InputNftMetadata, options?: Partial) => Promise>; + gasLessTransfer: (mint: Pubkey, owner: Secret, dest: Pubkey, feePayer: Pubkey) => Promise>; + gasLessMint: (owner: Secret, input: InputNftMetadata, feePayer: Pubkey, options?: Partial) => Promise>; + freeze: (mint: Pubkey, owner: Pubkey, freezeAuthority: Secret, options?: AuthorityOptions) => Result; + findByOwner: (owner: Pubkey, onOk: OnOk, onErr: OnErr, options?: { sortable?: SortDirection | undefined; isHolder?: boolean | undefined; } | undefined) => Promise; - findByMint: (mint: Pubkey$1) => Promise>; - burn: (mint: Pubkey$1, owner: Pubkey$1, signer: Secret, options?: AuthorityOptions) => Result; + findByMint: (mint: Pubkey) => Promise>; + burn: (mint: Pubkey, owner: Pubkey, ownerOrMultisig: Secret[], options?: Partial) => Result; }; -export { Account, Explorer, ExplorerOptions, FilterOptions, FilterType, KeypairAccount, Memo, MintTo, MintToChecked, ModuleName, Node, OwnerInfo, PostTokenAccount, Pubkey$1 as Pubkey, RegularNft, Secret, Transfer, TransferChecked, Try, Validator, ValidatorError, WithMemo, bufferToArray, convertTimestampToDateTime, debugLog, isBrowser, isNode, isPromise, overwriteObject, sleep, unixTimestamp }; +export { Account, Explorer, ExplorerOptions, FilterOptions, FilterType, KeypairAccount, Memo, MintTo, MintToChecked, ModuleName, Node, OwnerInfo, PostTokenAccount, Pubkey, RegularNft, Secret, Transfer, TransferChecked, Try, Validator, ValidatorError, WithMemo, bufferToArray, convertTimestampToDateTime, debugLog, isBrowser, isNode, isPromise, overwriteObject, sleep, unixTimestamp }; diff --git a/packages/suite-regular-nft/dist/index.js b/packages/suite-regular-nft/dist/index.js index 87f6e5814..d549fc5da 100644 --- a/packages/suite-regular-nft/dist/index.js +++ b/packages/suite-regular-nft/dist/index.js @@ -1630,10 +1630,10 @@ var SplToken; // ../suite-spl-token/src/add.ts var SplToken2; ((SplToken11) => { - SplToken11.add = async (token, owner, signers, totalAmount, mintDecimal, options = {}) => { + SplToken11.add = async (token, owner, ownerOrMultisig, totalAmount, mintDecimal, options = {}) => { return Try(async () => { - const payer = options.feePayer ? options.feePayer : signers[0]; - const keypairs = signers.map((s) => s.toKeypair()); + const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); const tokenAssociated = await Account4.Associated.retryGetOrCreate( token, owner, @@ -1661,14 +1661,14 @@ var SplToken2; var import_spl_token3 = require("@solana/spl-token"); var SplToken3; ((SplToken11) => { - SplToken11.burn = (mint, owner, signers, burnAmount, tokenDecimals, options = {}) => { + SplToken11.burn = (mint, owner, ownerOrMultisig, burnAmount, tokenDecimals, options = {}) => { return Try(() => { const tokenAccount = (0, import_spl_token3.getAssociatedTokenAddressSync)( mint.toPublicKey(), owner.toPublicKey() ); - const payer = options.feePayer ? options.feePayer : signers[0]; - const keypairs = signers.map((s) => s.toKeypair()); + const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); const inst = (0, import_spl_token3.createBurnCheckedInstruction)( tokenAccount, mint.toPublicKey(), @@ -1855,12 +1855,12 @@ var import_spl_token6 = require("@solana/spl-token"); var import_web310 = require("@solana/web3.js"); var SplToken6; ((SplToken11) => { - SplToken11.gasLessTransfer = async (mint, owner, dest, signers, amount, mintDecimal, feePayer) => { + SplToken11.gasLessTransfer = async (mint, owner, dest, amount, mintDecimal, feePayer) => { return Try(async () => { - const keypairs = signers.map((s) => s.toKeypair()); + const ownerPublicKey = owner.toKeypair().publicKey; const sourceToken = await Account4.Associated.makeOrCreateInstruction( mint, - owner, + ownerPublicKey.toString(), feePayer ); const destToken = await Account4.Associated.makeOrCreateInstruction( @@ -1880,10 +1880,10 @@ var SplToken6; sourceToken.tokenAccount.toPublicKey(), mint.toPublicKey(), destToken.tokenAccount.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, SplToken.calculateAmount(amount, mintDecimal), mintDecimal, - keypairs + [owner.toKeypair()] ); tx.add(inst2); } else { @@ -1891,17 +1891,15 @@ var SplToken6; sourceToken.tokenAccount.toPublicKey(), mint.toPublicKey(), destToken.tokenAccount.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, SplToken.calculateAmount(amount, mintDecimal), mintDecimal, - keypairs + [owner.toKeypair()] ); tx.add(destToken.inst).add(inst2); } tx.recentBlockhash = blockhashObj.blockhash; - keypairs.forEach((signer) => { - tx.partialSign(signer); - }); + tx.partialSign(owner.toKeypair()); const serializedTx = tx.serialize({ requireAllSignatures: false }); @@ -2209,7 +2207,7 @@ var SplToken7; ); return instructions; }; - SplToken11.mint = async (owner, signer, totalAmount, mintDecimal, input, options = {}) => { + SplToken11.mint = async (owner, totalAmount, mintDecimal, input, options = {}) => { return Try(async () => { const valid = Validator.checkAll(input); if (valid.isErr) { @@ -2217,9 +2215,10 @@ var SplToken7; } const { feePayer, freezeAuthority } = options; const storageType = input.storageType || DEFAULT_STORAGE_TYPE; - const payer = feePayer ? feePayer : signer; + const payer = feePayer ? feePayer : owner; input.royalty = 0; const sellerFeeBasisPoints = 0; + const ownerPublicKey = owner.toKeypair().publicKey; const storageMetadata = Storage.toConvertOffchaindata( input, input.royalty @@ -2262,7 +2261,7 @@ var SplToken7; const mint2 = Account4.Keypair.create(); const insts = await (0, SplToken11.createMint)( mint2.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, totalAmount, mintDecimal, datav2, @@ -2273,14 +2272,14 @@ var SplToken7; insts.push( (0, SplToken11.createFreezeAuthority)( mint2.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, freezeAuthority.toPublicKey() ) ); } return new TransactionBuilder6.Mint( insts, - [signer.toKeypair(), mint2.toKeypair()], + [owner.toKeypair(), mint2.toKeypair()], payer.toKeypair(), mint2.pubkey ); @@ -2317,10 +2316,10 @@ var SplToken8; var import_spl_token9 = require("@solana/spl-token"); var SplToken9; ((SplToken11) => { - SplToken11.transfer = async (mint, owner, dest, signers, amount, mintDecimal, options = {}) => { + SplToken11.transfer = async (mint, owner, dest, ownerOrMultisig, amount, mintDecimal, options = {}) => { return Try(async () => { - const payer = options.feePayer ? options.feePayer : signers[0]; - const keypairs = signers.map((s) => s.toKeypair()); + const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); const sourceToken = await Account4.Associated.retryGetOrCreate( mint, owner, @@ -2362,11 +2361,18 @@ var RegularNft; ((RegularNft11) => { const NFT_AMOUNT = 1; const NFT_DECIMALS = 0; - RegularNft11.burn = (mint, owner, signer, options = {}) => { - const feePayer = options.feePayer ? options.feePayer : signer; - return SplToken10.burn(mint, owner, [signer], NFT_AMOUNT, NFT_DECIMALS, { - feePayer - }); + RegularNft11.burn = (mint, owner, ownerOrMultisig, options = {}) => { + const feePayer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + return SplToken10.burn( + mint, + owner, + ownerOrMultisig, + NFT_AMOUNT, + NFT_DECIMALS, + { + feePayer + } + ); }; })(RegularNft || (RegularNft = {})); @@ -2517,15 +2523,16 @@ var RegularNft4; ); return instructions; }; - RegularNft11.mint = async (owner, signer, input, options = {}) => { + RegularNft11.mint = async (owner, input, options = {}) => { return Try(async () => { const valid = Validator.checkAll(input); if (valid.isErr) { throw valid.error; } const { feePayer, freezeAuthority } = options; - const payer = feePayer ? feePayer : signer; + const payer = feePayer ? feePayer : owner; const storageType = input.storageType || DEFAULT_STORAGE_TYPE; + const ownerPublicKey = owner.toKeypair().publicKey; let properties; if (input.properties) { properties = await Converter14.Properties.intoInfra( @@ -2585,7 +2592,7 @@ var RegularNft4; const mint2 = Account4.Keypair.create(); const instructions = await (0, RegularNft11.createMint)( mint2.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, datav2, payer.toKeypair().publicKey, isMutable @@ -2594,7 +2601,7 @@ var RegularNft4; instructions.push( (0, RegularNft11.createDeleagate)( mint2.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, freezeAuthority.toPublicKey() ) ); @@ -2608,7 +2615,7 @@ var RegularNft4; ) ); } - const keypairs = [signer.toKeypair(), mint2.toKeypair()]; + const keypairs = [owner.toKeypair(), mint2.toKeypair()]; if (input.creators) { input.creators.forEach((creator) => { if (Account4.Keypair.isSecret(creator.secret)) { @@ -2634,14 +2641,16 @@ var import_web313 = require("@solana/web3.js"); var RegularNft5; ((RegularNft11) => { const DEFAULT_STORAGE_TYPE = "nftStorage"; - RegularNft11.gasLessMint = async (owner, signer, input, feePayer, options = {}) => { + RegularNft11.gasLessMint = async (owner, input, feePayer, options = {}) => { return Try(async () => { const valid = Validator.checkAll(input); if (valid.isErr) { throw valid.error; } const storageType = input.storageType || DEFAULT_STORAGE_TYPE; - const sellerFeeBasisPoints = Converter14.Royalty.intoInfra(input.royalty); + const royalty = input.royalty ? input.royalty : 0; + const sellerFeeBasisPoints = Converter14.Royalty.intoInfra(royalty); + const ownerPublickey = owner.toKeypair().publicKey; let uri = ""; if (input.filePath) { const properties = await Converter14.Properties.intoInfra( @@ -2686,7 +2695,7 @@ var RegularNft5; const mint = Account4.Keypair.create(); const insts = await RegularNft4.createMint( mint.toPublicKey(), - owner.toPublicKey(), + ownerPublickey, datav2, feePayer.toPublicKey(), isMutable @@ -2695,7 +2704,7 @@ var RegularNft5; insts.push( RegularNft4.createDeleagate( mint.toPublicKey(), - owner.toPublicKey(), + ownerPublickey, options.freezeAuthority.toPublicKey() ) ); @@ -2708,7 +2717,7 @@ var RegularNft5; }); insts.forEach((inst) => tx.add(inst)); tx.recentBlockhash = blockhashObj.blockhash; - [signer, mint].forEach((signer2) => tx.partialSign(signer2.toKeypair())); + [owner, mint].forEach((signer) => tx.partialSign(signer.toKeypair())); const serializedTx = tx.serialize({ requireAllSignatures: false }); @@ -2723,12 +2732,11 @@ var RegularNft6; ((RegularNft11) => { const NFT_AMOUNT = 1; const NFT_DECIMALS = 0; - RegularNft11.gasLessTransfer = async (mint, owner, dest, signers, feePayer) => { + RegularNft11.gasLessTransfer = async (mint, owner, dest, feePayer) => { return SplToken10.gasLessTransfer( mint, owner, dest, - signers, NFT_AMOUNT, NFT_DECIMALS, feePayer @@ -2742,15 +2750,16 @@ var RegularNft7; ((RegularNft11) => { RegularNft11.DEFAULT_COLLECTION_SIZE = 0; const DEFAULT_STORAGE_TYPE = "nftStorage"; - RegularNft11.mintCollection = (owner, signer, input, options = {}) => { + RegularNft11.mintCollection = (owner, input, options = {}) => { return Try(async () => { const valid = Validator.checkAll(input); if (valid.isErr) { throw valid.error; } const { freezeAuthority, feePayer, collectionSize } = options; - const payer = feePayer ? feePayer : signer; + const payer = feePayer ? feePayer : owner; const storageType = input.storageType || DEFAULT_STORAGE_TYPE; + const ownerPublicKey = owner.toKeypair().publicKey; let properties; if (input.properties) { properties = await Converter14.Properties.intoInfra( @@ -2803,7 +2812,7 @@ var RegularNft7; ); const instructions = await RegularNft4.createMint( collectionMint.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, datav2, payer.toKeypair().publicKey, isMutable @@ -2812,14 +2821,14 @@ var RegularNft7; instructions.push( RegularNft4.createDeleagate( collectionMint.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, freezeAuthority.toPublicKey() ) ); } const collections = { collectionMetadata: collectionMetadataAccount, - collectionAuthority: signer.toKeypair().publicKey, + collectionAuthority: owner.toKeypair().publicKey, collectionMint: collectionMint.toKeypair().publicKey }; instructions.push( @@ -2831,7 +2840,7 @@ var RegularNft7; ); return new TransactionBuilder6.Mint( instructions, - [signer.toKeypair(), collectionMint.toKeypair()], + [owner.toKeypair(), collectionMint.toKeypair()], payer.toKeypair(), collectionMint.pubkey ); @@ -2874,12 +2883,12 @@ var RegularNft9; ((RegularNft11) => { const NFT_AMOUNT = 1; const NFT_DECIMALS = 0; - RegularNft11.transfer = (mint, owner, dest, signers, options = {}) => { + RegularNft11.transfer = (mint, owner, dest, ownerOrMultisig, options = {}) => { return SplToken10.transfer( mint, owner, dest, - signers, + ownerOrMultisig, NFT_AMOUNT, NFT_DECIMALS, options @@ -2921,4 +2930,4 @@ var RegularNft10 = { sleep, unixTimestamp }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXNwbC10b2tlbi9zcmMvYWRkLnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvY29uc3RhbnRzLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2JhdGNoLnRzIiwgIi4uLy4uL25vZGUvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbW1vbi50cyIsICIuLi8uLi9zaGFyZWQvc3JjL3NoYXJlZC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9taW50LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3BhcnRpYWwtc2lnbi50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jYWxjdWxhdGUtdHhza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G9pbnRVcmwubG9jYWxob3N0O1xuICAgIH1cbiAgfTtcblxuICBleHBvcnQgY29uc3Qgc3dpdGNoQnVuZGxyID0gKGVudjogc3RyaW5nKTogc3RyaW5nID0+IHtcbiAgICBzd2l0Y2ggKGVudikge1xuICAgICAgY2FzZSBDb25zdGFudHMuQ2x1c3Rlci5wcmQ6IHtcbiAgICAgICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5CdW5kbHJVcmwucHJkLnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIHJldHVybiBDb25zdGFudHMuQnVuZGxyVXJsLmRldjtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IHN3aXRjaERhc0FwaSA9IChlbnY6IHN0cmluZyk6IHN0cmluZyA9PiB7XG4gICAgc3dpdGNoIChlbnYpIHtcbiAgICAgIGNhc2UgQ29uc3RhbnRzLkNsdXN0ZXIucHJkOiB7XG4gICAgICAgIGlmIChkYXNBcGlVcmwubGVuZ3RoIDwgMSkge1xuICAgICAgICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuREFTX0FQSV9VUkwpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuQnVuZGxyVXJsLnByZC5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBjb25zdCB1cmxzID0gQ29uc3RhbnRzLkRhc0FwaVVybC5kZXYuc3BsaXQoJywnKTtcbiAgICAgICAgY29uc3QgaW5kZXggP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GNvbnN0IGl4c1NpemUgPSB0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMucmVkdWNlKChhY2MsIGl4KSA9PiB7XG4gICAgICBpeC5rZXlzLmZvckVhY2goKHsgcHVia2V5LCBpc1NpZ25lciB9KSA9PiB7XG4gICAgICAgIGNvbnN0IHBrID0gcHVia2V5LnRvQmFzZTU4KCk7XG4gICAgICAgIGlmIChpc1NpZ25lcikgc2lnbmVycy5hZGQocGspO1xuICAgICAgICBhY2NvdW50cy5hZGQocGspO1xuICAgICAgfSk7XG5cbiAgICAgIGFjY291bnRzLmFkZChpeC5wcm9ncmFtSWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IG5JbmRleGVzID0gaXgua2V5cy5sZW5ndGg7XG4gICAgICBjb25zdCBvcGFxdWVEYXRhID0gaXguZGF0YS5sZW5ndGg7XG5cbiAgICAgIHJldHVybiAoXG4gICAgICAgIGFjYyArXG4gICAgICAgIDEgKyAvLyBQSUQgaW5kZXhcbiAgICAgICAgY29tcGFjdEFycmF5U2l6ZShuSW5kZXhlcywgMSkgK1xuICAgICAgICBjb21wYWN0QXJyYXlTaXplKG9wYXF1ZURhdGEsIDEpXG4gICAgICApO1xuICAgIH0sIDApO1xuXG4gICAgcmV0dXJuIChcbiAgICAgIGNvbXBhY3RBcnJheVNpemUoc2lnbmVycy5zaXplLCA2NCkgKyAvLyBzaWduYXR1cmVzXG4gICAgICAzICsgLy8gaGVhZGVyXG4gICAgICBjb21wYWN0QXJyYXlTaXplKGFjY291bnRzLnNpemUsIDMyKSArIC8vIGFjY291bnRzXG4gICAgICAzMiArIC8vIGJsb2NraGFzaFxuICAgICAgY29tcGFjdEhlYWRlcih0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMubGVuZ3RoKSArIC8vIGluc3RydWN0aW9uc1xuICAgICAgaXhzU2l6ZVxuICAgICk7XG4gIH07XG5cbiAgLyoqXG4gICAqIElzIG1heCB0cmFuc2FjdGlvbiBzaXplXG4gICA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AgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2coYCMgbWludDogJHttaW50fSwgb3duZXI6ICR7b3duZXJ9LCBmZWVQYXllcjogJHtmZWVQYXllcn1gKTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBzbGVlcChSRVRSWV9TTEVFUF9USU1FKTtcbiAgICAgICAgY291bnRlcisrO1xuICAgICAgfVxuICAgICAgdGhyb3cgRXJyb3IoYHJldHJ5IGFjdGlvbiBpcyBvdmVyIGxpbWl0ICR7UkVUUllfT1ZFUl9MSU1JVH1gKTtcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogW01haW4gbG9naWNdR2V0IEFzc29jaWF0ZWQgdG9rZW4gQWNjb3VudC5cbiAgICAgKiBpZiBub3QgY3JlYXRlZCwgY3JlYXRlIG5ldyB0b2tlbiBhY2NvdWludFxuICAgICAqXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG1pbnRcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gb3duZXJcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gZmVlUGF5ZXJcbiAgICAgKiBAcmV0dXJucyBQcm9taXNlPHN0cmluZz5cbiAgICAgKi9cbiAgICBleHBvcnQgY29uc3QgbWFrZU9yQ3JlYXRlSW5zdHJ1Y3Rpb24gPSBhc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biAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9h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ZHJlc3MudG9QdWJsaWNLZXkoKS50b0J1ZmZlcigpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEJndW1TaWduZXIgPSAoKTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtCdWZmZXIuZnJvbSgnY29sbGVjdGlvbl9jcGknLCAndXRmOCcpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEFzc2V0SWQgPSAoYWRkcmVzczogUHVia2V5LCBsZWFmSW5kZXg6IG51bWJlcik6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCBub2RlID0gbmV3IEJOLkJOKGxlYWZJbmRleCk7XG4gICAgICBjb25zdCBbYXNzZXRJZF0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW1xuICAgICAgICAgIEJ1ZmZlci5mcm9tKCdhc3NldCcsICd1dGY4JyksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgVWludDhBcnJheS5mcm9tKG5vZGUudG9BcnJheSgnbGUnLCA4KSksXG4gICAgICAgIF0sXG4gICAgICAgIE1QTF9CVUJCTEVHVU1fUFJPR1JBTV9JRC50b1B1YmxpY0tleSgpLFxuICAgICAgKTtcbiAgICAgIHJldHVybiBhc3NldElkLnRvU3RyaW5nKCk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9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cbiAgICBleHBvcnQgY29uc3QgaW50b0luZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+ID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB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AgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTeW1ib2wobWV0YWRhdGEuc3ltYm9sKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZXMgJiYgcmVzLmlzRXJyKSB7XG4gICAgICAgICAgcmVzdWx0cy5wdXNoKC4uLnJlcy5lcnJvci5kZXRhaWxzKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICBpZiAocmVzdWx0cy5sZW5ndGggPiAwKSB7XG4gICAgICAgI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mc7XG5cbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICBjb25zdCBtZXRhZGF0YSA9IGF3YWl0IE1ldGFkYXRhLmZyb21BY2NvdW50QWRkcmVzcyhcbiAgICAgICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgICAgICBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShtaW50KSxcbiAgICAgICAgICApO1xuICAgICAgICAgIGRlYnVnTG9nKCcjIGZpbmRCeU93bmVyIG1ldGFkYXRhOiAnLCBtZXRhZGF0YSk7XG4gICAgICAgICAgLy8gdG9rZW5TdGFuZGFyZDogMChORlQpIG9yIDIgKFNQTC1UT0tFTilcbiAgICAgICAgICBpZiAobWV0YWRhdGEudG9rZW5TdGFuZGFyZCAhPT0gdG9rZW5TdGFuZGFyZCkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuICAgICAgICAgIGZldGNoKG1ldGFkYXRhLmRhdGEudXJpKVxuICAgICAgICAgICAgLnRoZW4oKHJlc3BvbnNlKSA9PiB7XG4gICAgICAgICAgICAgIHJlc3BvbnNlXG4gICAgICAgICAgICAgICAgLmpzb24oKVxuICAgICAgICAgICAgICAgIC50aGVuKChqc29uOiBPZmZjaGFpbikgPT4ge1xuICAgICAgICAgICAgICAgICAgZGF0YS5wdXNoKFxuICAgICAgICAgICAgICAgICAgICBjb252ZXJ0ZXI8VD4odG9rZW5TdGFuZGFyZCwgbWV0YWRhdGEsIGpzb24sIHRva2VuQW1vdW50KSxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICBjYWxsYmFjayhSZXN1bHQub2soZGF0YSkpOyAvLyBuZWVkIHRoaXMgY2FsbCA/XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAuY2F0Y2goKGUpID0+IHtcbiAgICAgICAgICAgICAgICAgIGNhbGxiYWNrKFJlc3VsdC5lcnIoZSkpO1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgLmZpbmFsbHkoKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgY29uc3QgZGVzY0FsZ28gPSBzb3J0QnlVaW5peFRpbWVzdGFtcDxUPihTb3J0RGlyZWN0aW9uLkRlc2MpO1xuICAgICAgICAgICAgICAgICAgY29uc3QgYXNjQWxnbyA9IHNvcnRCeVVpbml4VGltZXN0YW1wPFQ+KFNvcnREaXJlY3Rpb24uQXNjKTtcbiAgICAgICAgICAgICAgICAgIGlmIChzb3J0YWJsZSA9PT0gU29ydERpcmVjdGlvbi5EZXNjKSB7XG4gICAgICAgICAgICAgICAgICAgIGRhdGEgPSBkYXRhLnNvcnQoZGVzY0FsZ28pO1xuICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChzb3J0YWJsZSA9PT0gU29ydERpcmVjdGlvbi5Bc2MpIHtcbiAgICAgICAgICAgICAgICAgICAgZGF0YSA9IGRhdGEuc29ydChhc2NBbGdvKTtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIGNhbGxiYWNrKFJlc3VsdC5vayhkYXRhKSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgLmNhdGNoKChlKSA9PiB7XG4gICAgICAgICAgICAgIGNhbGxiYWNrKFJlc3VsdC5lcnIoZSkpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBpZiAoZSBpbnN0YW5jZW9mIEVycm9yICYmIFVOQUJMRV9FUlJPUl9SRUdFWC50ZXN0KGUubWVzc2FnZSkpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIHNraXAgZXJyb3IgZm9yIG9sZCBTUEwtVE9LRU46ICcsIG1pbnQpO1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfSBjYXRjaCAoZSkge1xuICAgICAgaWYgKGUgaW5zdGFuY2VvZiBFcnJv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ICApO1xuXG4gICAgICBsZXQgaW5zdDI7XG4gICAgICBjb25zdCBibG9ja2hhc2hPYmogPSBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5nZXRMYXRlc3RCbG9ja2hhc2goKTtcblxuICAgICAgY29uc3QgdHggPSBuZXcgVHJhbnNhY3Rpb24oe1xuICAgICAgICBsYXN0VmFsaWRCbG9ja0hlaWdodDogYmxvY2toYXNoT2JqLmxhc3RWYWxpZEJsb2NrSGVpZ2h0LFxuICAgICAgICBibG9ja2hhc2g6IGJsb2NraGFzaE9iai5ibG9ja2hhc2gsXG4gICAgICAgIGZlZVBheWVyOiBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgfSk7XG5cbiAgICAgIC8vIHJldHVybiBhc3NvY2lhdGVkIHRva2VuIGFjY291bnRcbiAgICAgIGlmICghZGVzdFRva2VuLmluc3QpIHtcbiAgICAgICAgaW5zdDIgPSBjcmVhdGVUcmFuc2ZlckNoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgICBzb3VyY2VUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgZGVzdFRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgQ2FsY3VsYXRvci5jYWxjdWxhdGVBbW91bnQoYW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgICAga2V5cGFpcnMsXG4gICAgICAgICk7XG4gICAgICAgIHR4LmFkZChpbnN0Mik7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICAvLyByZXR1cm4gaW5zdHJ1Y3Rpb24gYW5kIHVuZGVjaWRlZCBhc3NvY2lhdGVkIHRva2VuIGFjY291bnRcbiAgICAgICAgaW5zdDIgPSBjcmVhdGVUcmFuc2ZlckNo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Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgbWludCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBDYWxjdWxhdGUuY2FsY3VsYXRlQW1vdW50KHRvdGFsQW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNZXRhZGF0YUFjY291bnRWM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgbWV0YWRhdGE6IG1ldGFkYXRhUGRhLFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNZXRhZGF0YUFjY291bnRBcmdzVjM6IHtcbiAgICAgICAgICAgIGRhdGE6IHRva2VuTWV0YWRhdGEsXG4gICAgICAgICAgICBpc011dGFibGUsXG4gICAgICAgICAgICBjb2xsZWN0aW9uRGV0YWlsczogbnVsbCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuICAgIHJldHVybiBpbnN0cnVjdGlvbnM7XG4gIH07XG5cbiAgLyoqXG4gICAqIFNQTC1UT0tFTiBtaW50XG4gICAqXG4gICAqIEBwYXJhbSB7UHVia2V5fSBvd25lciAgICAgICAvLyB0b2tlbiBvd25lclxuICAgKiBAcGFyYW0ge1NlY3JldH0gc2ln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cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWV0YWRhdGFBY2NvdW50QXJnc1YzOiB7XG4gICAgICAgICAgICBkYXRhOiBuZnRNZXRhZGF0YSxcbiAgICAgICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25EZXRhaWxzOiBudWxsLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1hc3RlckVkaXRpb25WM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgZWRpdGlvbjogbWFzdGVyRWRpdGlvblB1YmtleSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIG1ldGFkYXRhOiB0b2tlbk1ldGFkYXRhUHVia2V5LFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWFzdGVyRWRpdGlvbkFyZ3M6IHtcbiAgICAgICAgICAgIG1heFN1cHBseTogMCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuICAgIHJldHVybiBpbnN0cnVjdGlvbnM7XG4gIH07XG5cbiAgLyoqXG4gICAqIFVwbG9hZCBjb250ZW50IGFuZCBORlQgbWludFxuICAgKlxuICAgKiBAcGFyYW0ge1B1YmtleX0gb3duZXIgICAgICAgICAgLy8gZmlyc3QgbWludGVkIG93bmVyXG4gICAqIEBwYXJhbSB7U2VjcmV0fSBzaWduZXIgICAgICAgICAvLyBvd25lcidzIFNlY3JldFxuICAgKiBAcGFyYW0ge0lucHV0TmZ0TWV0YWRhd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VsbGVyRmVlQmFzaXNQb2ludHMsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpc011dGFibGUgPSBpbnB1dC5pc011dGFibGUgPT09IHVuZGVmaW5lZCA/IHRydWUgOiBpbnB1dC5pc011dGFibGU7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGlucHV0OiAnLCBpbnB1dCk7XG4gICAgICBkZWJ1Z0xvZygnIyBkYXRhdjI6ICcsIGRhdGF2Mik7XG5cbiAgICAgIGNvbnN0IG1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG5cbiAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGF3YWl0IGNyZWF0ZU1pbnQoXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgLy8gY29sbGVjdGlvbiAtLS1cbiAgICAgIGlmIChpbnB1dC5jb2xsZWN0aW9uKSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZVZlcmlmeVNpemVkQ29sbGVjdGlvbihcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIGlucHV0LmNvbGxlY3Rpb24udG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBrZXlwYWlycyA9IFtzaWduZXIudG9LZXlwYWlyKCksIG1pbnQudG9LZXlwYWlyKCldO1xuXG4gICAgICAvLyBjcmVhdG9yIC0tLVxuICAgICAgaWYgKGlucHV0LmNyZWF0b3JzKSB7XG4gICAgICAgIGlucHV0LmNyZWF0b3JzLmZvckVhY2goKGNyZWF0b3IpID0+IHtcbiAgICAgICAgICBpZiAoQWNjb3VudC5LZXlwYWlyLmlzU2VjcmV0KGNyZWF0b3Iuc2VjcmV0KSkge1xuICAgICAgICAgICAgY29uc3QgY3JlYXRvclB1YmtleSA9IGNyZWF0b3IuYWRkcmVzcy50b1B1YmxpY0tleSgpO1xuICAgICAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZVZlcmlmeUNyZWF0b3IobWludC50b1B1YmxpY0tleSgpLCBjcmVhdG9yUHVia2V5KTtcbiAgICAgICAgICAgIGluc3RydWN0aW9ucy5wdXNoKGluc3QpO1xuICAgICAgICAgICAga2V5cGFpcnMucHVzaChjcmVhdG9yLnNlY3JldC50b0tleXBhaXIoKSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICBrZXlwYWlycyxcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIG1pbnQucHVia2V5LFxuICAgICAgKTtcbiAgICB9KTtcbiAgfTtcbn1cbiIsICJpbXBvcnQgeyBkZWJ1Z0xvZywgUmVzdWx0LCBUcnksIHVuaXhUaW1lc3RhbXAgfSBmcm9tIC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ICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgTWludC5jcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgZmVlUGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAob3B0aW9ucy5mcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHMucHVzaChcbiAgICAgICAgICBNaW50LmNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvcHRpb25zLmZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGJsb2NraGFzaE9iaiA9IGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldExhdGVzdEJsb2NraGFzaCgpO1xuICAgICAgY29uc3QgdHggPSBuZXcgVHJhbnNhY3Rpb24oe1xuICAgICAgICBsYXN0VmFsaWRCbG9ja0hlaWdodDogYmxvY2toYXNoT2JqLmxhc3RWYWxpZEJsb2NrSGVpZ2h0LFxuICAgICAgICBibG9ja2hhc2g6IGJsb2NraGFzaE9iai5ibG9ja2hhc2gsXG4gICAgICAgIGZlZVBheWVyOiBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgfSk7XG5cbiAgICAgIGluc3RzLmZvckVhY2goKGluc3QpID0+IHR4LmF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C5pc011dGFibGUgPT09IHVuZGVmaW5lZCA/IHRydWUgOiBpbnB1dC5pc011dGFibGU7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGlucHV0OiAnLCBpbnB1dCk7XG4gICAgICBkZWJ1Z0xvZygnIyBkYXRhdjI6ICcsIGRhdGF2Mik7XG5cbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25NaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgY29sbGVjdGlvbk1ldGFkYXRhQWNjb3VudCA9IEFjY291bnQuUGRhLmdldE1ldGFkYXRhKFxuICAgICAgICBjb2xsZWN0aW9uTWludC5wdWJrZXksXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhd2FpdCBNaW50LmNyZWF0ZU1pbnQoXG4gICAgICAgIGNvbGxlY3Rpb25NaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgTWludC5jcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25zID0ge1xuICAgICAgICBjb2xsZWN0aW9uTWV0YWRhdGE6IGNvbGxlY3Rpb25NZXR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3NvY2lhdGVkIHtcbiAgICBjb25zdCBSRVRSWV9PVkVSX0xJTUlUID0gMTA7XG4gICAgY29uc3QgUkVUUllfU0xFRVBfVElNRSA9IDM7XG4gICAgLy9AaW50ZXJuYWxcbiAgICBjb25zdCBnZXQgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSA9IGZhbHNlLFxuICAgICk6IFByb21pc2U8c3RyaW5nIHwgQ29tbW9uU3RydWN0dXJlPFB1YmtleT4+ID0+IHtcbiAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBvd25lcixcbiAgICAgICAgbmV3IEtleXBhaXIuS2V5cGFpcih7IHNlY3JldDogZmVlUGF5ZXIgfSkucHVia2V5LFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICApO1xuXG4gICAgICBpZiAoIXJlcy5pbnN0KSB7XG4gICAgICAgIHJldHVybiByZXMudG9rZW5BY2NvdW50O1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb248UHVia2V5PihcbiAgICAgICAgW3Jlcy5pbnN0XSxcbiAgICAgICAgW10sXG4gICAgICAgIGZlZVBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICByZXMudG9rZW5BY2NvdW50ISxcbiAgICAgICk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFJldHJ5IGZ1bmN0aW9uIGlmIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtTZWNyZXR9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IHJldHJ5R2V0T3JDcmVhdGUgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICApOiBQcm9taXNlPHN0cmluZz4gPT4ge1xuICAgICAgbGV0IGNvdW50ZXIgPSAxO1xuICAgICAgd2hpbGUgKGNvdW50ZXIgPCBSRVRSWV9PVkVSX0xJTUlUKSB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgY29uc3QgaW5zdCA9IGF3YWl0IGdldChtaW50LCBvd25lciwgZmVlUGF5ZXIsIHRydWUpO1xuXG4gICAgICAgICAgaWYgKGluc3QgJiYgdHlwZW9mIGluc3QgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBpbnN0KTtcbiAgICAgICAgICAgIHJldHVybiBpbnN0O1xuICAgICAgICAgIH0gZWxzZSBpZiAoaW5zdCBpbnN0YW5jZW9mIFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24pIHtcbiAgICAgICAgICAgIChhd2FpdCBpbnN0LnN1Ym1pdCgpKS5tYXAoXG4gICAgICAgICAgICAgIGFzeW5jIChvazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xu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W5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCBicyBmcm9tICdiczU4JztcblxuZXhwb3J0IG5hbWVzcGFjZSBBY2NvdW50IHtcbiAgZXhwb3J0IGNsYXNzIEtleXBhaXIge1xuICAgIHNlY3JldDogU2VjcmV0O1xuICAgIHB1YmtleTogUHVia2V5O1xuXG4gICAgY29uc3RydWN0b3IocGFyYW1zOiB7IHB1YmtleT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0YWRhdGEnKSxcbiAgICAgICAgICBQUk9HUkFNX0lELnRvQnVmZmVyKCksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgIF0sXG4gICAgICAgIFBST0dSQU1fSUQsXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldE1hc3RlckVkaXRpb24gPSAoYWRkcmVzczogUHVia2V5KTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtcbiAgICAgICAgICBCdWZmZXIuZnJvbSgnbWV0YWRhdGEnKSxcbiAgICAgICAgICBQUk9HUkFNX0lELnRvQnVmZmVyKCksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgQnVmZmVyLmZyb20oJ2VkaXRpb24nKSxcbiAgICAgICAgXSxcbiAgICAgICAgUFJPR1JBTV9JRCxcbiAgICAgICk7XG4gICAgICByZXR1cm4gcHVibGljS2V5O1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgZ2V0VHJlZUF1dGhvcml0eSA9IChhZGRyZXNzOiBQdWJrZXkpOiBQdWJsaWNLZXkgPT4ge1xuICAgICAgY29uc3QgW3B1YmxpY0tleV0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW2FkZHJlc3MudG9QdWJsaWNLZXkoKS50b0J1ZmZlcigpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEJndW1TaWduZXIgPSAoKT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JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJl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vdW50IDwgMSkge1xuICAgICAgICAgIGRlYnVnTG9nKFxuICAgICAgICAgICAgJyMgZmluZEJ5T3duZXIgbm8gaG9sZCBtZXRhZGF0YTogJyxcbiAgICAgICAgICAgIGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLFxuICAgICAgICAgICk7XG4gICAgICAgICAgY29udGludWU7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgbWludCA9IGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLm1pbnQgYXMgUHVia2V5O1xuICAgICAgICBjb25zdCB0b2tlbkFtb3VudCA9IGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLnRva2VuQW1vdW50XG4gICAgICAgICAgLmFtb3VudCBhcyBzdHJpbmc7XG5cbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICBjb25zdCBtZXRhZGF0YSA9IGF3YWl0IE1ldGFkYXRhLmZyb21BY2NvdW50QWRkcmVzcyhcbiAgICAgICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgICAgICBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShtaW50KSxcbiAgICAgICAgICApO1xuICAgICAgICAgIGRlYnVnTG9nKCcjIGZpbmRCeU93bmVyIG1ldGFkYXRhOiAnLCBtZXRhZGF0YSk7XG4gICAgICAgICAgLy8gdG9rZW5TdGFuZGFyZDogMChORlQpIG9yIDIgKFNQTC1UT0tFTilcbiAgICAgICAgICBpZiAobWV0YWRhdGEudG9rZW5TdGFuZGFyZCAhPT0gdG9rZW5TdGFuZGFyZCkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuICAgICAgICAgIGZldGNoKG1ldGFkYXRhLmRhdGEudXJpKVxuICAgICAgICAgICAgLnRoZW4oKHJlc3BvbnNlKSA9PiB7XG4gICAgICAgICAgICAgIHJlc3BvbnNlXG4gICAgICAgICAgICAgICAgLmpzb24oKVxuICAgICAgICAgICAgICAgIC50aGVuKChqc29uOiBPZmZjaGFpbikgPT4ge1xuICAgICAgICAgICAgICAgICAgZGF0YS5wdXNoKFxuICAgICAgICAgICAgICAgICAgICBjb252ZXJ0ZXI8VD4odG9rZW5TdGFuZGFyZCwgbWV0YWRhdGEsIGpzb24sIHRva2VuQW1vdW50KSxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICBjYWxsYmFjayhSZXN1bHQub2soZGF0YSkpOyAvLyBuZWVkIHRoaXMgY2FsbCA/XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAuY2F0Y2goKGUpID0+IHtcbiAgICAgICAgICAgICAgICAgIGNhbGxiYWNrKFJlc3VsdC5lcnIoZSkpO1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgLmZpbmFsbHkoKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgY29uc3QgZGVzY0FsZ28gPSBzb3J0QnlVaW5peFRpbWVzdGFtcDxUPihTb3J0RGlyZWN0aW9uLkRlc2MpO1xuICAgICAgICAgICAgICAgICAgY29uc3QgYXNjQWxnbyA9IHNvcnRCeVVpbml4VGltZXN0YW1wPFQ+KFNvcnREaXJlY3Rpb24uQXNjKTtcbiAgICAgICAgICAgICAgICAgIGlmIChzb3J0YWJsZSA9PT0gU29ydERpcmVjdGlvbi5EZXNjKSB7XG4gICAgICAgICAgICAgICAgICAgIGRhdGEgPSBkYXRhLnNvcnQoZGVzY0FsZ28pO1xuICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChzb3J0YWJsZSA9PT0gU29ydERpcmVjdGlvbi5Bc2MpIHtcbiAgICAgICAgICAgICAgICAgICAgZGF0YSA9IGRhdGEuc29ydChhc2NBbGdvKTtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIGNhbGxiYWNrKFJlc3VsdC5vayhkYXRhKSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgLmNhdGNoKChlKSA9PiB7X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nRvS2V5cGFpcigpLnB1YmxpY0tleTtcbiAgICAgIGNvbnN0IHNvdXJjZVRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLm1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBvd25lclB1YmxpY0tleS50b1N0cmluZygpLFxuICAgICAgICBmZWVQYXllcixcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGRlc3RUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5tYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgZGVzdCxcbiAgICAgICAgZmVlUGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBsZXQgaW5zdDI7XG4gICAgICBjb25zdCBibG9ja2hhc2hPYmogPSBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5nZXRMYXRlc3RCbG9ja2hhc2goKTtcblxuICAgICAgY29uc3QgdHggPSBuZXcgVHJhbnNhY3Rpb24oe1xuICAgICAgICBsYXN0VmFsaWRCbG9ja0hlaWdodDogYmxvY2toYXNoT2JqLmxhc3RWYWxpZEJsb2NrSGVpZ2h0LFxuICAgICAgICBibG9ja2hhc2g6IGJsb2NraGFzaE9iai5ibG9ja2hhc2gsXG4gICAgICAgIGZlZVBheWVyOiBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgfSk7XG5cbiAgICAgIC8vIHJldHVybiBhc3NvY2lhdGVkIHRva2VuIGFjY291bnRcbiAgICAgIGlmICghZGVzdFRva2VuLmluc3QpIHtcbiAgICAgICAgaW5zdDIgPSBjcmVhdGVUcmFuc2ZlckNoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgICBzb3VyY2VUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgZGVzdFRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgIENhbGN1bGF0b3IuY2FsY3VsYXRlQW1vdW50KGFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICAgIFtvd25lci50b0tleXBhaXIoKV0sXG4gICAgICAgICk7XG4gICAgICAgIHR4LmFkZChpbnN0Mik7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICAvLyByZXR1cm4gaW5zdHJ1Y3Rpb24gYW5kIHVuZGVjaWRlZCBhc3NvY2lhdGVkIHRva2VuIGFjY291bnRcbiAgICAgICAgaW5zdDIgPSBjcmVhdGVUcmFuc2ZlckNoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgICBzb3VyY2VUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgZGVzdFRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgIENhbGN1bGF0b3IuY2FsY3VsYXRlQW1vdW50KGFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICAgIFtvd25lci50b0tleXBhaXIoKV0sXG4gICAgICAgICk7XG4gICAgICAgIHR4LmFkZChkZXN0VG9rZW4uaW5zdCkuYWRkKGluc3QyKTtcbiAgICAgIH1cblxuICAgICAgdHgucmVjZW50QmxvY2toYXNoID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcbiAgICAgIHR4LnBhcnRpYWxTaWduKG93bmVyLnRvS2V5cGFpcigpKTtcblxuICAgICAgY29uc3Qgc2VyaWFsaXplZFR4ID0gdHguc2VyaWFsaXplKHtcbiAgICAgICAgcmVxdWlyZUFsbFNpZ25hdHVyZXM6IGZhbHNlLFxuICAgIC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uICAgICAgfSksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlSW5pdGlhbGl6ZU1pbnRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBvd25lcixcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICBmZWVQYXllcixcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgbWludCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBDYWxjdWxhdGUuY2FsY3VsYXRlQW1vdW50KHRvdGFsQW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNZXRhZGF0YUFjY291bnRWM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgbWV0YWRhdGE6IG1ldGFkYXRhUGRhLFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNZXRh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cbiAgICAgICAgICBzdG9yYWdlVHlwZSxcbiAgICAgICAgICBwYXllcixcbiAgICAgICAgKTtcblxuICAgICAgICBpZiAodXBsb2FkZWQuaXNFcnIpIHtcbiAgICAgICAgICB0aHJvdyB1cGxvYWRlZDtcbiAgICAgICAgfVxuICAgICAgICB1cmkgPSB1cGxvYWRlZC52YWx1ZTtcbiAgICAgIH0gZWxzZSBpZiAoaW5wdXQudXJpKSB7XG4gICAgICAgIGNvbnN0IGltYWdlID0geyBpbWFnZTogaW5wdXQudXJpIH07XG4gICAgICAgIGNvbnN0IHVwbG9hZGVkID0gYXdhaXQgU3RvcmFnZS51cGxvYWREYXRhKFxuICAgICAgICAgIHsgLi4uc3RvcmFnZU1ldGFkYXRhLCAuLi5pbWFnZSB9LFxuICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgIHBheWVyLFxuICAgICAgICApO1xuICAgICAgICBpZiAodXBsb2FkZWQuaXNFcnIpIHtcbiAgICAgICAgICB0aHJvdyB1cGxvYWRlZDtcbiAgICAgICAgfVxuICAgICAgICB1cmkgPSB1cGxvYWRlZC52YWx1ZTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHRocm93IEVycm9yKGBNdXN0IHNldCBmaWxlUGF0aCcgb3IgJ3VyaSdgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gdHJ1ZTtcblxuICAgICAgY29uc3QgZGF0YXYyID0gQ29udmVydGVyLlRva2VuTWV0YWRhdGEuaW50b0luZnJhKFxuICAgICAgICBpbnB1dCxcbiAgICAgICAgdXJpLFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcbiAgICAgIGRlYnVnTG9nKCcjIHVwbG9hZCBjb250ZW50IHVybDogJywgdXJpKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgdG90YWxBbW91bnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RzLnB1c2goXG4gICAgICAgICAgY3JlYXRlRnJlZXplQXV0aG9yaXR5KFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5NaW50KFxuICAgICAgICBpbnN0cyxcbiAgICAgICAgW293bmVyLnRvS2V5cGFpcigpLCBtaW50LnRvS2V5cGFpcigpXSxcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIG1pbnQucHVia2V5LFxuICAgICAgKTtcbiAgICB9KTtcbiAgfTtcbn1cbiIsICJpbXBvcnQgeyBDb25zdGFudHMsIGRlYnVnTG9nLCBpc0Jyb3dzZXIsIGlzTm9kZSB9IGZyb20gJ34vc2hhcmVkJztcbmltcG9ydCB7IEZpbGVUeXBlLCBJZGVudGl0eSwgVGFncywgVXBsb2FkYWJsZUZpbGVUeXBlIH0gZnJvbSAnfi90eXBlcy9zdG9yYWdlJztcbmltcG9ydCB7IFBoYW50b21Qcm92aWRlciB9IGZyb20gJ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gVHJ5KGFzeW5jICgpID0+IHtcbiAgICAgIGNvbnN0IHBheWVyID0gb3B0aW9ucy5mZWVQYXllciA/IG9wdGlvbnMuZmVlUGF5ZXIgOiBvd25lck9yTXVsdGlzaWdbMF07XG4gICAgICBjb25zdCBrZXlwYWlycyA9IG93bmVyT3JNdWx0aXNpZy5tYXAoKHMpID0+IHMudG9LZXlwYWlyKCkpO1xuXG4gICAgICBjb25zdCBzb3VyY2VUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5yZXRyeUdldE9yQ3JlYXRlKFxuICAgICAgICBtaW50LFxuICAgICAgICBvd25lcixcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBkZXN0VG9rZW4gPSBhd2FpdCBBY2NvdW50LkFzc29jaWF0ZWQucmV0cnlHZXRPckNyZWF0ZShcbiAgICAgICAgbWludCxcbiAgICAgICAgZGVzdCxcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpbnN0ID0gY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHNvdXJjZVRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgZGVzdFRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIENhbGN1bGF0b3IuY2FsY3VsYXRlQW1vdW50KGFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAga2V5cGFpcnMsXG4gICAgICApO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24oW2luc3RdLCBrZXlwYWlycywgcGF5ZXIudG9LZXlwYWlyKCkpO1xuICAgIH0pO1xuICB9O1xufVxuIiwgImltcG9ydCB7IFNwbFRva2VuIGFzIEFkZCB9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2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKGZlZVBheWVyLCBhdGEsIG93bmVyLCBtaW50KSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uKG1pbnQsIGF0YSwgb3duZXIsIDEsIDApKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWV0YWRhdGFBY2NvdW50VjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIG1ldGFkYXRhOiB0b2tlbk1ldGFkYXRhUHVia2V5LFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNZXRhZGF0YUFjY291bnRBcmdzVjM6IHtcbiAgICAgICAgICAgIGRhdGE6IG5mdE1ldGFkYXRhLFxuICAgICAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgICAgICAgY29sbGVjdGlvbkRldGFpbHM6IG51bGwsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWFzdGVyRWRpdGlvblYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBlZGl0aW9uOiBtYXN0ZXJFZGl0aW9uUHVia2V5LFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgbWV0YWRhdG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nB1c2goXG4gICAgICAgICAgY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICAvLyBjb2xsZWN0aW9uIC0tLVxuICAgICAgaWYgKGlucHV0LmNvbGxlY3Rpb24pIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlVmVyaWZ5U2l6ZWRDb2xsZWN0aW9uKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgaW5wdXQuY29sbGVjdGlvbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGtleXBhaXJzID0gW293bmVyLnRvS2V5cGFpcigpLCBtaW50LnRvS2V5cGFpcigpXTtcblxuICAgICAgLy8gY3JlYXRvciAtLS1cbiAgICAgIGlmIChpbnB1dC5jcmVhdG9ycykge1xuICAgICAgICBpbnB1dC5jcmVhdG9ycy5mb3JFYWNoKChjcmVhdG9yKSA9PiB7XG4gICAgICAgICAgaWYgKEFjY291bnQuS2V5cGFpci5pc1NlY3JldChjcmVhdG9yLnNlY3JldCkpIHtcbiAgICAgICAgICAgIGNvbnN0IGNyZWF0b3JQdWJrZXkgPSBjcmVhdG9yLmFkZHJlc3MudG9QdWJsaWNLZXkoKTtcbiAgICAgICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVWZXJpZnlDcmVhdG9yKG1pbnQudG9QdWJsaWNLZXkoKSwgY3JlYXRvclB1YmtleSk7XG4gICAgICAgICAgICBpbnN0cnVjdGlvbnMucHVz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yBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgTWludC5jcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBjb2xsZWN0aW9ucyA9IHtcbiAgICAgICAgY29sbGVjdGlvbk1ldGFkYXRhOiBjb2xsZWN0aW9uTWV0YWRhdGFBY2NvdW50LFxuICAgICAgICBjb2xsZWN0aW9uQXV0aG9yaXR5OiBvd25lci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGNvbGxlY3Rpb25NaW50OiBjb2xsZWN0aW9uTWludC50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICB9O1xuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlU2V0Q29sbGVjdGlvblNpemVJbnN0cnVjdGlvbihjb2xsZWN0aW9ucywge1xuICAgICAgICAgIHNldENvbGxlY3Rpb25TaXplQXJnczoge1xuICAgICAgICAgICAgc2l6ZTogY29sbGVjdGlvblNpemUgfHwgREVGQVVMVF9DT0xMRUNUSU9OX1NJWkUsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSksXG4gICAgICApO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5NaW50KFxuICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgIFtvd25lci50b0tleXBhaXIoKSwgY29sbGVjdGlvbk1pbnQudG9LZXlwYWlyKCldLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgY29s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d1bGFyTmZ0IiwgIlNwbFRva2VuIiwgImltcG9ydF9zcGxfdG9rZW4iLCAiaW1wb3J0X21wbF90b2tlbl9tZXRhZGF0YSIsICJSZWd1bGFyTmZ0IiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImltcG9ydF93ZWIzIiwgImltcG9ydF9zcGxfdG9rZW4iLCAiaW1wb3J0X21wbF90b2tlbl9tZXRhZGF0YSIsICJSZWd1bGFyTmZ0IiwgIm1pbnQiLCAiQWNjb3VudCIsICJDb252ZXJ0ZXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImltcG9ydF93ZWIzIiwgIlJlZ3VsYXJOZnQiLCAiQ29udmVydGVyIiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlJlZ3VsYXJOZnQiLCAiU3BsVG9rZW4iLCAiaW1wb3J0X21wbF90b2tlbl9tZXRhZGF0YSIsICJSZWd1bGFyTmZ0IiwgIkNvbnZlcnRlciIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfc3BsX3Rva2VuIiwgImltcG9ydF9tcGxfdG9rZW5fbWV0YWRhdGEiLCAiUmVndWxhck5mdCIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJSZWd1bGFyTmZ0IiwgIlNwbFRva2VuIiwgIlJlZ3VsYXJOZnQiXQp9Cg== \ No newline at end of file diff --git a/packages/suite-regular-nft/dist/index.mjs b/packages/suite-regular-nft/dist/index.mjs index 6312ff6ab..c50c3eab6 100644 --- a/packages/suite-regular-nft/dist/index.mjs +++ b/packages/suite-regular-nft/dist/index.mjs @@ -1598,10 +1598,10 @@ var SplToken; // ../suite-spl-token/src/add.ts var SplToken2; ((SplToken11) => { - SplToken11.add = async (token, owner, signers, totalAmount, mintDecimal, options = {}) => { + SplToken11.add = async (token, owner, ownerOrMultisig, totalAmount, mintDecimal, options = {}) => { return Try(async () => { - const payer = options.feePayer ? options.feePayer : signers[0]; - const keypairs = signers.map((s) => s.toKeypair()); + const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); const tokenAssociated = await Account4.Associated.retryGetOrCreate( token, owner, @@ -1632,14 +1632,14 @@ import { } from "@solana/spl-token"; var SplToken3; ((SplToken11) => { - SplToken11.burn = (mint, owner, signers, burnAmount, tokenDecimals, options = {}) => { + SplToken11.burn = (mint, owner, ownerOrMultisig, burnAmount, tokenDecimals, options = {}) => { return Try(() => { const tokenAccount = getAssociatedTokenAddressSync2( mint.toPublicKey(), owner.toPublicKey() ); - const payer = options.feePayer ? options.feePayer : signers[0]; - const keypairs = signers.map((s) => s.toKeypair()); + const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); const inst = createBurnCheckedInstruction( tokenAccount, mint.toPublicKey(), @@ -1832,12 +1832,12 @@ import { createTransferCheckedInstruction } from "@solana/spl-token"; import { Transaction as Transaction5 } from "@solana/web3.js"; var SplToken6; ((SplToken11) => { - SplToken11.gasLessTransfer = async (mint, owner, dest, signers, amount, mintDecimal, feePayer) => { + SplToken11.gasLessTransfer = async (mint, owner, dest, amount, mintDecimal, feePayer) => { return Try(async () => { - const keypairs = signers.map((s) => s.toKeypair()); + const ownerPublicKey = owner.toKeypair().publicKey; const sourceToken = await Account4.Associated.makeOrCreateInstruction( mint, - owner, + ownerPublicKey.toString(), feePayer ); const destToken = await Account4.Associated.makeOrCreateInstruction( @@ -1857,10 +1857,10 @@ var SplToken6; sourceToken.tokenAccount.toPublicKey(), mint.toPublicKey(), destToken.tokenAccount.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, SplToken.calculateAmount(amount, mintDecimal), mintDecimal, - keypairs + [owner.toKeypair()] ); tx.add(inst2); } else { @@ -1868,17 +1868,15 @@ var SplToken6; sourceToken.tokenAccount.toPublicKey(), mint.toPublicKey(), destToken.tokenAccount.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, SplToken.calculateAmount(amount, mintDecimal), mintDecimal, - keypairs + [owner.toKeypair()] ); tx.add(destToken.inst).add(inst2); } tx.recentBlockhash = blockhashObj.blockhash; - keypairs.forEach((signer) => { - tx.partialSign(signer); - }); + tx.partialSign(owner.toKeypair()); const serializedTx = tx.serialize({ requireAllSignatures: false }); @@ -2200,7 +2198,7 @@ var SplToken7; ); return instructions; }; - SplToken11.mint = async (owner, signer, totalAmount, mintDecimal, input, options = {}) => { + SplToken11.mint = async (owner, totalAmount, mintDecimal, input, options = {}) => { return Try(async () => { const valid = Validator.checkAll(input); if (valid.isErr) { @@ -2208,9 +2206,10 @@ var SplToken7; } const { feePayer, freezeAuthority } = options; const storageType = input.storageType || DEFAULT_STORAGE_TYPE; - const payer = feePayer ? feePayer : signer; + const payer = feePayer ? feePayer : owner; input.royalty = 0; const sellerFeeBasisPoints = 0; + const ownerPublicKey = owner.toKeypair().publicKey; const storageMetadata = Storage.toConvertOffchaindata( input, input.royalty @@ -2253,7 +2252,7 @@ var SplToken7; const mint2 = Account4.Keypair.create(); const insts = await (0, SplToken11.createMint)( mint2.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, totalAmount, mintDecimal, datav2, @@ -2264,14 +2263,14 @@ var SplToken7; insts.push( (0, SplToken11.createFreezeAuthority)( mint2.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, freezeAuthority.toPublicKey() ) ); } return new TransactionBuilder6.Mint( insts, - [signer.toKeypair(), mint2.toKeypair()], + [owner.toKeypair(), mint2.toKeypair()], payer.toKeypair(), mint2.pubkey ); @@ -2311,10 +2310,10 @@ var SplToken8; import { createTransferCheckedInstruction as createTransferCheckedInstruction2 } from "@solana/spl-token"; var SplToken9; ((SplToken11) => { - SplToken11.transfer = async (mint, owner, dest, signers, amount, mintDecimal, options = {}) => { + SplToken11.transfer = async (mint, owner, dest, ownerOrMultisig, amount, mintDecimal, options = {}) => { return Try(async () => { - const payer = options.feePayer ? options.feePayer : signers[0]; - const keypairs = signers.map((s) => s.toKeypair()); + const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); const sourceToken = await Account4.Associated.retryGetOrCreate( mint, owner, @@ -2356,11 +2355,18 @@ var RegularNft; ((RegularNft11) => { const NFT_AMOUNT = 1; const NFT_DECIMALS = 0; - RegularNft11.burn = (mint, owner, signer, options = {}) => { - const feePayer = options.feePayer ? options.feePayer : signer; - return SplToken10.burn(mint, owner, [signer], NFT_AMOUNT, NFT_DECIMALS, { - feePayer - }); + RegularNft11.burn = (mint, owner, ownerOrMultisig, options = {}) => { + const feePayer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + return SplToken10.burn( + mint, + owner, + ownerOrMultisig, + NFT_AMOUNT, + NFT_DECIMALS, + { + feePayer + } + ); }; })(RegularNft || (RegularNft = {})); @@ -2527,15 +2533,16 @@ var RegularNft4; ); return instructions; }; - RegularNft11.mint = async (owner, signer, input, options = {}) => { + RegularNft11.mint = async (owner, input, options = {}) => { return Try(async () => { const valid = Validator.checkAll(input); if (valid.isErr) { throw valid.error; } const { feePayer, freezeAuthority } = options; - const payer = feePayer ? feePayer : signer; + const payer = feePayer ? feePayer : owner; const storageType = input.storageType || DEFAULT_STORAGE_TYPE; + const ownerPublicKey = owner.toKeypair().publicKey; let properties; if (input.properties) { properties = await Converter14.Properties.intoInfra( @@ -2595,7 +2602,7 @@ var RegularNft4; const mint2 = Account4.Keypair.create(); const instructions = await (0, RegularNft11.createMint)( mint2.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, datav2, payer.toKeypair().publicKey, isMutable @@ -2604,7 +2611,7 @@ var RegularNft4; instructions.push( (0, RegularNft11.createDeleagate)( mint2.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, freezeAuthority.toPublicKey() ) ); @@ -2618,7 +2625,7 @@ var RegularNft4; ) ); } - const keypairs = [signer.toKeypair(), mint2.toKeypair()]; + const keypairs = [owner.toKeypair(), mint2.toKeypair()]; if (input.creators) { input.creators.forEach((creator) => { if (Account4.Keypair.isSecret(creator.secret)) { @@ -2644,14 +2651,16 @@ import { Transaction as Transaction6 } from "@solana/web3.js"; var RegularNft5; ((RegularNft11) => { const DEFAULT_STORAGE_TYPE = "nftStorage"; - RegularNft11.gasLessMint = async (owner, signer, input, feePayer, options = {}) => { + RegularNft11.gasLessMint = async (owner, input, feePayer, options = {}) => { return Try(async () => { const valid = Validator.checkAll(input); if (valid.isErr) { throw valid.error; } const storageType = input.storageType || DEFAULT_STORAGE_TYPE; - const sellerFeeBasisPoints = Converter14.Royalty.intoInfra(input.royalty); + const royalty = input.royalty ? input.royalty : 0; + const sellerFeeBasisPoints = Converter14.Royalty.intoInfra(royalty); + const ownerPublickey = owner.toKeypair().publicKey; let uri = ""; if (input.filePath) { const properties = await Converter14.Properties.intoInfra( @@ -2696,7 +2705,7 @@ var RegularNft5; const mint = Account4.Keypair.create(); const insts = await RegularNft4.createMint( mint.toPublicKey(), - owner.toPublicKey(), + ownerPublickey, datav2, feePayer.toPublicKey(), isMutable @@ -2705,7 +2714,7 @@ var RegularNft5; insts.push( RegularNft4.createDeleagate( mint.toPublicKey(), - owner.toPublicKey(), + ownerPublickey, options.freezeAuthority.toPublicKey() ) ); @@ -2718,7 +2727,7 @@ var RegularNft5; }); insts.forEach((inst) => tx.add(inst)); tx.recentBlockhash = blockhashObj.blockhash; - [signer, mint].forEach((signer2) => tx.partialSign(signer2.toKeypair())); + [owner, mint].forEach((signer) => tx.partialSign(signer.toKeypair())); const serializedTx = tx.serialize({ requireAllSignatures: false }); @@ -2733,12 +2742,11 @@ var RegularNft6; ((RegularNft11) => { const NFT_AMOUNT = 1; const NFT_DECIMALS = 0; - RegularNft11.gasLessTransfer = async (mint, owner, dest, signers, feePayer) => { + RegularNft11.gasLessTransfer = async (mint, owner, dest, feePayer) => { return SplToken10.gasLessTransfer( mint, owner, dest, - signers, NFT_AMOUNT, NFT_DECIMALS, feePayer @@ -2752,15 +2760,16 @@ var RegularNft7; ((RegularNft11) => { RegularNft11.DEFAULT_COLLECTION_SIZE = 0; const DEFAULT_STORAGE_TYPE = "nftStorage"; - RegularNft11.mintCollection = (owner, signer, input, options = {}) => { + RegularNft11.mintCollection = (owner, input, options = {}) => { return Try(async () => { const valid = Validator.checkAll(input); if (valid.isErr) { throw valid.error; } const { freezeAuthority, feePayer, collectionSize } = options; - const payer = feePayer ? feePayer : signer; + const payer = feePayer ? feePayer : owner; const storageType = input.storageType || DEFAULT_STORAGE_TYPE; + const ownerPublicKey = owner.toKeypair().publicKey; let properties; if (input.properties) { properties = await Converter14.Properties.intoInfra( @@ -2813,7 +2822,7 @@ var RegularNft7; ); const instructions = await RegularNft4.createMint( collectionMint.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, datav2, payer.toKeypair().publicKey, isMutable @@ -2822,14 +2831,14 @@ var RegularNft7; instructions.push( RegularNft4.createDeleagate( collectionMint.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, freezeAuthority.toPublicKey() ) ); } const collections = { collectionMetadata: collectionMetadataAccount, - collectionAuthority: signer.toKeypair().publicKey, + collectionAuthority: owner.toKeypair().publicKey, collectionMint: collectionMint.toKeypair().publicKey }; instructions.push( @@ -2841,7 +2850,7 @@ var RegularNft7; ); return new TransactionBuilder6.Mint( instructions, - [signer.toKeypair(), collectionMint.toKeypair()], + [owner.toKeypair(), collectionMint.toKeypair()], payer.toKeypair(), collectionMint.pubkey ); @@ -2884,12 +2893,12 @@ var RegularNft9; ((RegularNft11) => { const NFT_AMOUNT = 1; const NFT_DECIMALS = 0; - RegularNft11.transfer = (mint, owner, dest, signers, options = {}) => { + RegularNft11.transfer = (mint, owner, dest, ownerOrMultisig, options = {}) => { return SplToken10.transfer( mint, owner, dest, - signers, + ownerOrMultisig, NFT_AMOUNT, NFT_DECIMALS, options @@ -2930,4 +2939,4 @@ export { sleep, unixTimestamp }; -//# sourceMappingURL=data:application/json;base64,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1Y3Rpb25zICYmICFhLnNpZ25lcnMpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKFxuICAgICAgICAgICAgICBgb25seSBJbnN0cnVjdGlvbiBvYmplY3QgdGhhdCBjYW4gdXNlIGJhdGNoU3VibWl0KCkuXG4gICAgICAgICAgICBJbmRleDogJHtpfSwgU2V0IHZhbHVlOiAke0pTT04uc3RyaW5naWZ5KGEpfWAsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpKys7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5pbnN0cnVjdGlvbnMpO1xuICAgICAgICBjb25zdCBzaWduZXJzID0gYXJyLmZsYXRNYXAoKGEpID0+IGEuc2lnbmVycyk7XG4gICAgICAgIGNvbnN0IGZlZVBheWVycyA9IGFyci5maWx0ZXIoKGEpID0+IGEuZmVlUGF5ZXIgIT09IHVuZGVmaW5lZCk7XG4gICAgICAgIGxldCBmZWVQYXllciA9IHNpZ25lcnNbMF07XG4gICAgICAgIGlmIChmZWVQYXllcnMubGVuZ3RoID4gMCAmJiBmZWVQYXllcnNbMF0uZmVlUGF5ZXIpIHtcbiAgICAgICAgICBmZWVQYXllciA9IGZlZVBheWVyc1swXS5mZWVQYXllcjtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHRyYW5zYWN0aW9uID0gbmV3IFRyYW5zYWN0aW9uKCk7XG4gICAgICAgIGxldCBmaW5hbFNpZ25lcnMgPSBzaWduZXJzO1xuICAgICAgICBpZiAoZmVlUGF5ZXIpIHtcbiAgICAgICAgICB0cmFuc2FjdGlvbi5mZWVQYXllciA9IGZlZVBheWVyLnB1YmxpY0tleTtcbiAgICAgICAgICBmaW5hbFNpZ25lcnMgPSBbZmVlUGF5ZXIsIC4uLnNpZ25lcnNdO1xuICAgICAgICB9XG4gICAgICAgIGluc3RydWN0aW9ucy5tYXAoKGluc3QpID0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mVyLCBmZWVQYXllciwgdHJ1ZSk7XG5cbiAgICAgICAgICBpZiAoaW5zdCAmJiB0eXBlb2YgaW5zdCA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGluc3QpO1xuICAgICAgICAgICAgcmV0dXJuIGluc3Q7XG4gICAgICAgICAgfSBlbHNlIGlmIChpbnN0IGluc3RhbmNlb2YgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbikge1xuICAgICAgICAgICAgKGF3YWl0IGluc3Quc3VibWl0KCkpLm1hcChcbiAgICAgICAgICAgICAgYXN5bmMgKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZWF0ZSB0b2tlbiBhY2NvdW50OiBgLCBlKTtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyBtaW50OiAke21pbnR9LCBvd25lcjogJHtvd25lcn0sIGZlZVBheWVyOiAke2ZlZVBheWVyfWApO1xuICAgICAgICB9XG4gICAgICAgIGF3YWl0IHNsZWVwKFJFVFJZX1NMRUVQX1RJTUUpO1xuICAgICAgICBjb3VudGVyKys7XG4gICAgICB9XG4gICAgICB0aHJvdyBFcn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0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgIC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3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIG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tlblN0YW5kYXJkLFxuICAgIHNvcnRhYmxlPzogU29ydERpcmVjdGlvbixcbiAgICBpc0hvbGRlcj86IGJvb2xlYW4sXG4gICk6IFByb21pc2U8dm9pZD4gPT4ge1xuICAgIHRyeSB7XG4gICAgICBsZXQgZGF0YTogVFtdID0gW107XG4gICAgICBjb25zdCBjb25uZWN0aW9uID0gTm9kZS5nZXRDb25uZWN0aW9uKCk7XG4gICAgICBjb25zdCBpbmZvID0gYXdhaXQgY29ubmVjdGlvbi5nZXRQYXJzZWRUb2tlbkFjY291bnRzQnlPd25lcihcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAge1xuICAgICAgICAgIHByb2dyYW1JZDogVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgfSxcbiAgICAgICk7XG5cbiAgICAgIGluZm8udmFsdWUubGVuZ3RoID09PSAwICYmIGNhbGxiYWNrKFJlc3VsdC5vayhbXSkpO1xuXG4gICAgICBmb3IgYXdhaXQgKGNvbnN0IGQgb2YgaW5mby52YWx1ZSkge1xuICAgICAgICBpZiAoaXNIb2xkZXIgJiYgZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8udG9rZW5BbW91bnQudWlBbW91bnQgPCAxKSB7XG4gICAgICAgICAgZGVidWdMb2coXG4gICAgICAgICAgICAnIyBmaW5kQnlPd25lciBubyBob2xkIG1ldGFkYXRhOiAnLFxuICAgICAgICAgICAgZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8sXG4gICAgICAgICAgKTtcbiAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBtaW50ID0gZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8ubWludCBhcyBQdWJrZXk7XG4gICAgICAgIGNvbnN0IHRva2VuQW1vdW50ID0gZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8udG9rZW5BbW91bnRcbiAgICAgICAgICAuYW1vdW50IGFzIHN0cmluZztcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IG1ldGFkYXRhID0gYXdhaXQgTWV0YWRhdGEuZnJvbUFjY291bnRBZGRyZXNzKFxuICAgICAgICAgICAgY29ubmVjdGlvbixcbiAgICAgICAgICAgIEFjY291bnQuUGRhLmdldE1ldGFkYXRhKG1pbnQpLFxuICAgICAgICAgICk7XG4gICAgICAgICAgZGVidWdMb2coJyMgZmluZEJ5T3duZXIgbWV0YWRhdGE6ICcsIG1ldGFkYXRhKTtcbiAgICAgICAgICAvLyB0b2tlblN0YW5kYXJkOiAwKE5GVCkgb3IgMiAoU1BMLVRPS0VOKVxuICAgICAgICAgIGlmIChtZXRhZGF0YS50b2tlblN0YW5kYXJkICE9PSB0b2tlblN0YW5kYXJkKSB7XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICB9XG4gICAgICAgICAgZmV0Y2gobWV0YWRhdGEuZGF0YS51cmkpXG4gICAgICAgICAgICAudGhlbigocmVzcG9uc2UpID0+IHtcbiAgICAgICAgICAgICAgcmVzcG9uc2VcbiAgICAgICAgICAgICAgICAuanNvbigpXG4gICAgICAgICAgICAgICAgLnRoZW4oKGpzb246IE9mZmNoYWluKSA9PiB7XG4gICAgICAgICAgICAgICAgICBkYXRhLnB1c2goXG4gICAgICAgICAgICAgICAgICAgIGNvbnZlcnRlcjxUPih0b2tlblN0YW5kYXJkLCBtZXRhZGF0YSwganNvbiwgdG9rZW5BbW91bnQpLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgIGNhbGxiYWNrKFJlc3VsdC5vayhkYXRhKSk7IC8vIG5lZWQgdGhpcyBjYWxsID9cbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIC5jYXRjaCgoZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgY2FsbGJhY2soUmVzdWx0LmVycihlKSk7XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAuZmluYWxseSgoKSA9PiB7XG4gICAgICAgICAgICAgICAgICBjb25zdCBkZXNjQWxnbyA9IHNvcnRCeVVpbml4VGltZXN0YW1wPFQ+KFNvcnREaXJlY3Rpb24uRGVzYyk7XG4gICAgICAgICAgICAgICAgICBjb25zdCBhc2NBbGdvID0gc29ydEJ5VWluaXhUaW1lc3RhbXA8VD4oU29ydERpcmVjdGlvbi5Bc2MpO1xuICAgICAgICAgICAgICAgICAgaWYgKHNvcnRhYmxlID09PSBTb3J0RGlyZWN0aW9uLkRlc2MpIHtcbiAgICAgICAgICAgICAgICAgICAgZGF0YSA9IGRhdGEuc29ydChkZXNjQWxnbyk7XG4gICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHNvcnRhYmxlID09PSBTb3J0RGlyZWN0aW9uLkFzYykge1xuICAgICAgICAgICAgICAgICAgICBkYXRhID0gZGF0YS5zb3J0KGFzY0FsZ28pO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgY2FsbGJhY2soUmVzdWx0Lm9rKGRhdGEpKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAuY2F0Y2goKGUpID0+IHtcbiAgICAgICAgICAgICAgY2FsbGJhY2soUmVzdWx0LmVycihlKSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGlmIChlIGluc3RhbmNlb2YgRXJyb3IgJiYgVU5BQkxFX0VSUk9SX1JFR0VYLnRlc3QoZS5tZXNzYWdlKSkge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgc2tpcCBlcnJvciBmb3Igb2xkIFNQTC1UT0tFTjogJywgbWludCk7XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9IGNhdGNoIChlKSB7XG4gICAgICBpZiAoZSBpbnN0YW5jZW9mIEVycm9yKSB7XG4gICAgICAgIGNhbGxiYWNrKFJlc3VsdC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rpb24oXG4gICAgICAgIGZlZVBheWVyLFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBtaW50LFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIENhbGN1bGF0ZS5jYWxjdWxhdGVBbW91bnQodG90YWxBbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1ldGFkYXRhQWNjb3VudFYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBtZXRhZGF0YTogbWV0YWRhdGFQZGEsXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3VudEFyZ3NWMzoge1xuICAgICAgICAgICAgZGF0YTogdG9rZW5NZXRhZGF0YSxcbiAgICAgICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25EZXRhaWxzOiBudWxsLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG4gICAgcmV0dXJuIGluc3RydWN0aW9ucztcbiAgfTtcblxuICAvKipcbiAgICogU1BMLVRPS0VOIG1pbnRcbiAgICpcbiAgICogQHBhcmFtIHtQdWJrZXl9IG93b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NvbnN0IHVwbG9hZGVkID0gYXdhaXQgU3RvcmFnZS51cGxvYWREYXRhKFxuICAgICAgICAgIHsgLi4uc3RvcmFnZU1ldGFkYXRhLCAuLi5pbWFnZSB9LFxuICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgIHBheWVyLFxuICAgICAgICApO1xuICAgICAgICBpZiAodXBsb2FkZWQuaXNFcnIpIHtcbiAgICAgICAgICB0aHJvdyB1cGxvYWRlZDtcbiAgICAgICAgfVxuICAgICAgICB1cmkgPSB1cGxvYWRlZC52YWx1ZTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHRocm93IEVycm9yKGBNdXN0IHNldCBmaWxlUGF0aCcgb3IgJ3VyaSdgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gdHJ1ZTtcblxuICAgICAgY29uc3QgZGF0YXYyID0gQ29udmVydGVyLlRva2VuTWV0YWRhdGEuaW50b0luZnJhKFxuICAgICAgICBpbnB1dCxcbiAgICAgICAgdXJpLFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcbiAgICAgIGRlYnVnTG9nKCcjIHVwbG9hZCBjb250ZW50IHVybDogJywgdXJpKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICB0b3RhbEFtb3VudCxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcm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3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNZXRhZGF0YUFjY291bnRBcmdzVjM6IHtcbiAgICAgICAgICAgIGRhdGE6IG5mdE1ldGFkYXRhLFxuICAgICAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgICAgICAgY29sbGVjdGlvbkRldGFpbHM6IG51bGwsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWFzdGVyRWRpdGlvblYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBlZGl0aW9uOiBtYXN0ZXJFZGl0aW9uUHVia2V5LFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgbWV0YWRhdGE6IHRva2VuTWV0YWRhdGFQdWJrZXksXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNYXN0ZXJFZGl0aW9uQXJnczoge1xuICAgICAgICAgICAgbWF4U3VwcGx5OiAwLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG4gICAgcmV0dXJuIGluc3RydWN0aW9ucztcbiAgfTtcblxuICAvKipcbiAgICogVXBsb2FkIGNvbnRlbnQgYW5kIE5GVCBtaW50XG4gICAqXG4gICAqIEBwYXJhbSB7UHVia2V5fSBvd25lciAgICAgICAgICAvLyBmaXJzdCBtaW50ZWQgb3duZXJcbiAgICogQHBhcmFtIHtTZWNyZXR9IHNpZ25lciAgICA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dCxcbiAgICAgICAgdXJpLFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGlzTXV0YWJsZSA9IGlucHV0LmlzTXV0YWJsZSA9PT0gdW5kZWZpbmVkID8gdHJ1ZSA6IGlucHV0LmlzTXV0YWJsZTtcblxuICAgICAgZGVidWdMb2coJyMgaW5wdXQ6ICcsIGlucHV0KTtcbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICAvLyBjb2xsZWN0aW9uIC0tLVxuICAgICAgaWYgKGlucHV0LmNvbGxlY3Rpb24pIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlVmVyaWZ5U2l6ZWRDb2xsZWN0aW9uKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgaW5wdXQuY29sbGVjdGlvbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGtleXBhaXJzID0gW3NpZ25lci50b0tleXBhaXIoKSwgbWludC50b0tleXBhaXIoKV07XG5cbiAgICAgIC8vIGNyZWF0b3IgLS0tXG4gICAgICBpZiAoaW5wdXQuY3JlYXRvcnMpIHtcbiAgICAgICAgaW5wdXQuY3JlYXRvcnMuZm9yRWFjaCgoY3JlYXRvcikgPT4ge1xuICAgICAgICAgIGlmIChBY2NvdW50LktleXBhaXIuaXNTZWNyZXQoY3JlYXRvci5zZWNyZXQpKSB7XG4gICAgICAgICAgICBjb25zdCBjcmVhdG9yUHVia2V5ID0gY3JlYXRvci5hZGRyZXNzLnRvUHVibGljS2V5KCk7XG4gICAgICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlVmVyaWZ5Q3JlYXRvcihtaW50LnRvUHVibGljS2V5KCksIGNyZWF0b3JQdWJrZXkpO1xuICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goaW5zdCk7XG4gICAgICAgICAgICBrZXlwYWlycy5wdXNoKGNyZWF0b3Iuc2VjcmV0LnRvS2V5cGFpcigpKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5NaW50KFxuICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgIGtleXBhaXJzLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgbWludC5wdWJrZXksXG4gICAgICApO1xuICAgIH0pO1xuICB9O1xufVxuIiwgImltcG9ydCB7IGRlYnVnTG9nLCBSZXN1bHQsIFRyeSwgdW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2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuXG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgaW5zdHMgPSBhd2FpdCBNaW50LmNyZWF0ZU1pbnQoXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChvcHRpb25zLmZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cy5wdXNoKFxuICAgICAgICAgIE1pbnQuY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG9wdGlvbnMuZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgYmxvY2toYXNoT2JqID0gYXdhaXQgTm9kZS5nZXRDb25uZWN0aW9uKCkuZ2V0TGF0ZXN0QmxvY2toYXNoKCk7XG4gICAgICBjb25zdCB0eCA9IG5ldyBUcmFuc2FjdGlvbih7XG4gICAgICAgIGxhc3RWYWxpZEJsb2NrSGVpZ2h0OiBibG9ja2hhc2hPYmoubGFzdFZhbGlkQmxvY2tIZWlnaHQsXG4gICAgICAgIGJsb2NraGFzaDogYmxvY2toYXNoT2JqLmJsb2NraGFzaCxcbiAgICAgICAgZmVlUGF5ZXI6IGZlZVBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICB9KTtcbl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iAgICAgIGNvbnN0IGlzTXV0YWJsZSA9IGlucHV0LmlzTXV0YWJsZSA9PT0gdW5kZWZpbmVkID8gdHJ1ZSA6IGlucHV0LmlzTXV0YWJsZTtcblxuICAgICAgZGVidWdMb2coJyMgaW5wdXQ6ICcsIGlucHV0KTtcbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgY29sbGVjdGlvbk1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG4gICAgICBjb25zdCBjb2xsZWN0aW9uTWV0YWRhdGFBY2NvdW50ID0gQWNjb3VudC5QZGEuZ2V0TWV0YWRhdGEoXG4gICAgICAgIGNvbGxlY3Rpb25NaW50LnB1YmtleSxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGF3YWl0IE1pbnQuY3JlYXRlTWludChcbiAgICAgICAgY29sbGVjdGlvbk1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBNaW50LmNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIGNvbGxlY3Rpb25NaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgY29sbGVjdGlvbnMgPSB7XG4gICAgICAgI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tcbiAgICAgICAgICBpZiAoIWEuaW5zdHJ1Y3Rpb25zICYmICFhLnNpZ25lcnMpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKFxuICAgICAgICAgICAgICBgb25seSBJbnN0cnVjdGlvbiBvYmplY3QgdGhhdCBjYW4gdXNlIGJhdGNoU3VibWl0KCkuXG4gICAgICAgICAgICBJbmRleDogJHtpfSwgU2V0IHZhbHVlOiAke0pTT04uc3RyaW5naWZ5KGEpfWAsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpKys7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5pbnN0cnVjdGlvbnMpO1xuICAgICAgICBjb25zdCBzaWduZXJzID0gYXJyLmZsYXRNYXAoKGEpID0+IGEuc2lnbmVycyk7XG4gICAgICAgIGNvbnN0IGZlZVBheWVycyA9IGFyci5maWx0ZXIoKGEpID0+IGEuZmVlUGF5ZXIgIT09IHVuZGVmaW5lZCk7XG4gICAgICAgIGxldCBmZWVQYXllciA9IHNpZ25lcnNbMF07XG4gICAgICAgIGlmIChmZWVQYXllcnMubGVuZ3RoID4gMCAmJiBmZWVQYXllcnNbMF0uZmVlUGF5ZXIpIHtcbiAgICAgICAgICBmZWVQYXllciA9IGZlZVBheWVyc1swXS5mZWVQYXllcjtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHRyYW5zYWN0aW9uID0gbmV3IFRyYW5zYWN0aW9uKCk7XG4gICAgICAgIGxldCBmaW5hbFNpZ25lcnMgPSBzaWduZXJzO1xuICAgICAgICBpZiAoZmVlUGF5ZXIpIHtcbiAgICAgICAgICB0cmFuc2FjdGlvbi5mZWVQYXllciA9IGZlZVBheWVyLnB1YmxpY0tleTtcbiAgICAgICAgICBmaW5hbFNpZ25lcnMgPSBbZmVlUGF5ZXIsIC4uLnNpZ25lcnNdO1xuICAgICAgICB9XG4gICAgICAgI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0ID0gYXdhaXQgZ2V0KG1pbnQsIG93bmVyLCBmZWVQYXllciwgdHJ1ZSk7XG5cbiAgICAgICAgICBpZiAoaW5zdCAmJiB0eXBlb2YgaW5zdCA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGluc3QpO1xuICAgICAgICAgICAgcmV0dXJuIGluc3Q7XG4gICAgICAgICAgfSBlbHNlIGlmIChpbnN0IGluc3RhbmNlb2YgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbikge1xuICAgICAgICAgICAgKGF3YWl0IGluc3Quc3VibWl0KCkpLm1hcChcbiAgICAgICAgICAgICAgYXN5bmMgKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZWF0ZSB0b2tlbiBhY2NvdW50OiBgLCBlKTtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyBtaW50OiAke21pbnR9LCBvd25lcjogJHtvd25lcn0sIGZlZVBheWVyOiAke2ZlZVBheWVyfWApO1xuICAgICAgICB9XG4gICAgICAgIGF3YWl0IHNsZWVwKFJFVFJZX1NMRUVQX1RJTUUpO1xuICAgICAgICBjb3VudGVyKys7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gICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb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9rZW5BY2NvdW50KSB7XG4gICAgICAgIGNvbnN0IGZvdW5kU291cmNlID0gbWFwcGluZ1Rva2VuQWNjb3VudC5maW5kKFxuICAgICAgICAgIChtKSA9PiBtLmFjY291bnQgPT09IG91dHB1dC5wYXJzZWQuaW5mby5zb3VyY2UsXG4gICAgICAgICk7XG4gICAgICAgIGNvbnN0IGZvdW5kRGVzdCA9IG1hcHBpbmdUb2tlbkFjY291bnQuZmluZChcbiAgICAgICAgICAobSkgPT4gbS5hY2NvdW50ID09PSBvdXRwdXQucGFyc2VkLmluZm8uZGVzdGluYXRpb24sXG4gICAgICAgICk7XG4gICAgICAgIGZvdW5kU291cmNlICYmIChoaXN0b3J5LnNvdXJjZSA9IGZvdW5kU291cmNlLm93bmVyKTtcbiAgICAgICAgZm91bmREZXN0ICYmIChoaXN0b3J5LmRlc3RpbmF0aW9uID0gZm91bmREZXN0Lm93bmVyKTtcbiAgICAgIH1cblxuICAgICAgaGlzdG9yeS50b2tlbkFtb3VudCA9IG91dHB1dC5wYXJzZWQuaW5mby50b2tlbkFtb3VudDtcbiAgICAgIGhpc3RvcnkubWludCA9IG91dHB1dC5wYXJzZWQuaW5mby5taW50O1xuICAgICAgaGlzdG9yeS5tdWx0aXNpZ0F1dGhvcml0eSA9IG91dHB1dC5wYXJzZWQuaW5mby5tdWx0aXNpZ0F1dGhvcml0eTtcbiAgICAgIGhpc3Rvcnkuc2lnbmVycyA9IG91dHB1dC5wYXJzZWQuaW5mby5zaWduZXJzO1xuICAgICAgaGlzdG9yeS50eXBlID0gb3V0cHV0LnByb2dyYW07XG4gICAgICBoaXN0b3J5LmRhdGVUaW1lID0gY29udmVydFRpbWVzdGFtcFRvRGF0ZVRpbWUobWV0YS5ibG9ja1RpbWUgYXMgbnVtYmVyKTtcbiAgICAgIGhpc3Rvcnkuc2lnID0gbWV0YS50cmFuc2FjdGlvbi5zaWduYXR1cmVzWzBdO1xuICAgICAgaGlzdG9yeS5pbm5lckluc3RydWN0aW9uID0gZ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yA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICA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DxUW10sIEVycm9yPikgPT4gdm9pZCxcbiAgICB0b2tlblN0YW5kYXJkOiBUb2tlblN0YW5kYXJkLFxuICAgIHNvcnRhYmxlPzogU29ydERpcmVjdGlvbixcbiAgICBpc0hvbGRlcj86IGJvb2xlYW4sXG4gICk6IFByb21pc2U8dm9pZD4gPT4ge1xuICAgIHRyeSB7XG4gICAgICBsZXQgZGF0YTogVFtdID0gW107XG4gICAgICBjb25zdCBjb25uZWN0aW9uID0gTm9kZS5nZXRDb25uZWN0aW9uKCk7XG4gICAgICBjb25zdCBpbmZvID0gYXdhaXQgY29ubmVjdGlvbi5nZXRQYXJzZWRUb2tlbkFjY291bnRzQnlPd25lcihcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAge1xuICAgICAgICAgIHByb2dyYW1JZDogVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgfSxcbiAgICAgICk7XG5cbiAgICAgIGluZm8udmFsdWUubGVuZ3RoID09PSAwICYmIGNhbGxiYWNrKFJlc3VsdC5vayhbXSkpO1xuXG4gICAgICBmb3IgYXdhaXQgKGNvbnN0IGQgb2YgaW5mby52YWx1ZSkge1xuICAgICAgICBpZiAoaXNIb2xkZXIgJiYgZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8udG9rZW5BbW91bnQudWlBbW91bnQgPCAxKSB7XG4gICAgICAgICAgZGVidWdMb2coXG4gICAgICAgICAgICAnIyBmaW5kQnlPd25lciBubyBob2xkIG1ldGFkYXRhOiAnLFxuICAgICAgICAgICAgZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8sXG4gICAgICAgICAgKTtcbiAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBtaW50ID0gZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8ubWludCBhcyBQdWJrZXk7XG4gICAgICAgIGNvbnN0IHRva2VuQW1vdW50ID0gZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8udG9rZW5BbW91bnRcbiAgICAgICAgICAuYW1vdW50IGFzIHN0cmluZztcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IG1ldGFkYXRhID0gYXdhaXQgTWV0YWRhdGEuZnJvbUFjY291bnRBZGRyZXNzKFxuICAgICAgICAgICAgY29ubmVjdGlvbixcbiAgICAgICAgICAgIEFjY291bnQuUGRhLmdldE1ldGFkYXRhKG1pbnQpLFxuICAgICAgICAgICk7XG4gICAgICAgICAgZGVidWdMb2coJyMgZmluZEJ5T3duZXIgbWV0YWRhdGE6ICcsIG1ldGFkYXRhKTtcbiAgICAgICAgICAvLyB0b2tlblN0YW5kYXJkOiAwKE5GVCkgb3IgMiAoU1BMLVRPS0VOKVxuICAgICAgICAgIGlmIChtZXRhZGF0YS50b2tlblN0YW5kYXJkICE9PSB0b2tlblN0YW5kYXJkKSB7XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICB9XG4gICAgICAgICAgZmV0Y2gobWV0YWRhdGEuZGF0YS51cmkpXG4gICAgICAgICAgICAudGhlbigocmVzcG9uc2UpID0+IHtcbiAgICAgICAgICAgICAgcmVzcG9uc2VcbiAgICAgICAgICAgICAgICAuanNvbigpXG4gICAgICAgICAgICAgICAgLnRoZW4oKGpzb246IE9mZmNoYWluKSA9PiB7XG4gICAgICAgICAgICAgICAgICBkYXRhLnB1c2goXG4gICAgICAgICAgICAgICAgICAgIGNvbnZlcnRlcjxUPih0b2tlblN0YW5kYXJkLCBtZXRhZGF0YSwganNvbiwgdG9rZW5BbW91bnQpLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgIGNhbGxiYWNrKFJlc3VsdC5vayhkYXRhKSk7IC8vIG5lZWQgdGhpcyBjYWxsID9cbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIC5jYXRjaCgoZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgY2FsbGJhY2soUmVzdWx0LmVycihlKSk7XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAuZmluYWxseSgoKSA9PiB7XG4gICAgICAgICAgICAgICAgICBjb25zdCBkZXNjQWxnbyA9IHNvcnRCeVVpbml4VGltZXN0YW1wPFQ+KFNvcnREaXJlY3Rpb24uRGVzYyk7XG4gICAgICAgICAgICAgICAgICBjb25zdCBhc2NBbGdvID0gc29ydEJ5VWluaXhUaW1lc3RhbXA8VD4oU29ydERpcmVjdGlvbi5Bc2MpO1xuICAgICAgICAgICAgICAgICAgaWYgKHNvcnRhYmxlID09PSBTb3J0RGlyZWN0aW9uLkRlc2MpIHtcbiAgICAgICAgICAgICAgICAgICAgZGF0YSA9IGRhdGEuc29ydChkZXNjQWxnbyk7XG4gICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHNvcnRhYmxlID09PSBTb3J0RGlyZWN0aW9uLkFzYykge1xuICAgICAgICAgICAgICAgICAgICBkYXRhID0gZGF0YS5zb3J0KGFzY0FsZ28pO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgY2FsbGJhY2soUmVzdWx0Lm9rKGRhdGEpKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAuY2F0Y2goKGUpID0+IHtcbiAgICAgICAgICAgICAgY2FsbGJhY2soUmVzdWx0LmVycihlKSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGlmIChlIGluc3RhbmNlb2YgRXJyb3IgJiYgVU5BQkxFX0VSUk9SX1JFR0VYLnRlc3QoZS5tZXNzYWdlKSkge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgc2tpcCBlcnJvciBmb3Igb2xkIFNQTC1UT0tFTjogJywgbWludCk7XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9IGNhdGNoIChlKSB7XG4gICAgICBpZiAoZSB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LFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBtaW50LFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIENhbGN1bGF0ZS5jYWxjdWxhdGVBbW91bnQodG90YWxBbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1ldGFkYXRhQWNjb3VudFYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBtZXRhZGF0YTogbWV0YWRhdGFQZGEsXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3VudEFyZ3NWMzoge1xuICAgICAgICAgICAgZGF0YTogdG9rZW5NZXRhZGF0YSxcbiAgICAgICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25EZXRhaWxzOiBudWxsLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG4gICAgcmV0dXJuIGluc3RydWN0aW9ucztcbiAgfTtcblxuICAvKipcbiAgICogU1BMLVRPS0VOIG1pbnRcbiAgICpcbiAgICogQHBhcmFtIHtTZWNyZXR9IG93bmVyICAgICAgLy8gdG9rZW4gb3duZX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yYWdlLnVwbG9hZERhdGEoXG4gICAgICAgICAgeyAuLi5zdG9yYWdlTWV0YWRhdGEsIC4uLmltYWdlIH0sXG4gICAgICAgICAgc3RvcmFnZVR5cGUsXG4gICAgICAgICAgcGF5ZXIsXG4gICAgICAgICk7XG4gICAgICAgIGlmICh1cGxvYWRlZC5pc0Vycikge1xuICAgICAgICAgIHRocm93IHVwbG9hZGVkO1xuICAgICAgICB9XG4gICAgICAgIHVyaSA9IHVwbG9hZGVkLnZhbHVlO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhyb3cgRXJyb3IoYE11c3Qgc2V0IGZpbGVQYXRoJyBvciAndXJpJ2ApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBpc011dGFibGUgPSB0cnVlO1xuXG4gICAgICBjb25zdCBkYXRhdjIgPSBDb252ZXJ0ZXIuVG9rZW5NZXRhZGF0YS5pbnRvSW5mcmEoXG4gICAgICAgIGlucHV0LFxuICAgICAgICB1cmksXG4gICAgICAgIHNlbGxlckZlZUJhc2lzUG9pbnRzLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuICAgICAgZGVidWdMb2coJyMgdXBsb2FkIGNvbnRlbnQgdXJsOiAnLCB1cmkpO1xuXG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgaW5zdHMgPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICB0b3RhbEFtb3VudCxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmICh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YWRhdGE6IHRva2VuTWV0YWRhdGFQdWJrZXksXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3VudEFyZ3NWMzoge1xuICAgICAgICAgICAgZGF0YTogbmZ0TWV0YWRhdGEsXG4gICAgICAgICAgICBpc011dGFibGUsXG4gICAgICAgICAgICBjb2xsZWN0aW9uRGV0YWlsczogbnVsbCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNYXN0ZXJFZGl0aW9uVjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIGVkaXRpb246IG1hc3RlckVkaXRpb25QdWJrZXksXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICBtZXRhZGF0YTogdG9rZW5NZXRhZGF0YVB1YmtleSxcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1hc3RlckVkaXRpb25BcmdzOiB7XG4gICAgICAgICAgICBtYXhTdXBwbHk6IDAsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcbiAgICByZXR1cm4gaW5zdHJ1Y3Rpb25zO1xuICB9O1xuXG4gIC8qKlxuICAgKiBVcGxvYWQgY29udGVudCBhbmQgTkZUIG1pbnRcbiAgICpcbiAgICogQHBhcmFtIHtTZWNyZXR9IG93bmV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bnZlcnRlci5SZWd1bGFyTmZ0TWV0YWRhdGEuaW50b0luZnJhKFxuICAgICAgICBpbnB1dCxcbiAgICAgICAgdXJpLFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGlzTXV0YWJsZSA9IGlucHV0LmlzTXV0YWJsZSA9PT0gdW5kZWZpbmVkID8gdHJ1ZSA6IGlucHV0LmlzTXV0YWJsZTtcblxuICAgICAgZGVidWdMb2coJyMgaW5wdXQ6ICcsIGlucHV0KTtcbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIC8vIGNvbGxlY3Rpb24gLS0tXG4gICAgICBpZiAoaW5wdXQuY29sbGVjdGlvbikge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVWZXJpZnlTaXplZENvbGxlY3Rpb24oXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBpbnB1dC5jb2xsZWN0aW9uLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3Qga2V5cGFpcnMgPSBbb3duZXIudG9LZXlwYWlyKCksIG1pbnQudG9LZXlwYWlyKCldO1xuXG4gICAgICAvLyBjcmVhdG9yIC0tLVxuICAgICAgaWYgKGlucHV0LmNyZWF0b3JzKSB7XG4gICAgICAgIGlucHV0LmNyZWF0b3JzLmZvckVhY2goKGNyZWF0b3IpID0+IHtcbiAgICAgICAgICBpZiAoQWNjb3VudC5LZXlwYWlyLmlzU2VjcmV0KGNyZWF0b3Iuc2VjcmV0KSkge1xuICAgICAgICAgICAgY29uc3QgY3JlYXRvclB1YmtleSA9IGNyZWF0b3IuYWRkcmVzcy50b1B1YmxpY0tleSgpO1xuICAgICAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZVZlcmlmeUNyZWF0b3IobWludC50b1B1YmxpY0tleSgpLCBjcmVhdG9yUHVia2V5KTtcbiAgICAgICAgICAgIGluc3RydWN0aW9ucy5wdXNoKGluc3QpO1xuICAgICAgICAgICAga2V5cGFpcnMucHVzaChjcmVhdG9yLnNlY3JldC50b0tleXBhaXIoKSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICBrZXlwYWlycyxcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIG1pbnQucHVia2V5LFxuICAgICAgKTtcbiAgICB9KTtcbiAgfTtcbn1cbiIsICJpbX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dDogJywgaW5wdXQpO1xuICAgICAgZGVidWdMb2coJyMgc2VsbGVyRmVlQmFzaXNQb2ludHM6ICcsIHNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgTWludC5jcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGlja2V5LFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIGZlZVBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKG9wdGlvbnMuZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RzLnB1c2goXG4gICAgICAgICAgTWludC5jcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY2tleSxcbiAgICAgICAgICAgIG9wdGlvbnMuZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgYmxvY2toYXNoT2JqID0gYXdhaXQgTm9kZS5nZXRDb25uZWN0aW9uKCkuZ2V0TGF0ZXN0QmxvY2toYXNoKCk7XG4gICAgICBjb25zdCB0eCA9IG5ldyBUcmFuc2FjdGlvbih7XG4gICAgICAgIGxhc3RWYWxpZEJsb2NrSGVpZ2h0OiBibG9ja2hhc2hPYmoubGFzdFZhbGlkQmxvY2tIZWlnaHQsXG4gICAgICAgIGJsb2NraGFzaDogYmxvY2toYXNoT2JqLmJsb2NraGFzaCxcbiAgICAgICAgZmVlU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wKTtcblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gaW5wdXQuaXNNdXRhYmxlID09PSB1bmRlZmluZWQgPyB0cnVlIDogaW5wdXQuaXNNdXRhYmxlO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBpbnB1dDogJywgaW5wdXQpO1xuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuXG4gICAgICBjb25zdCBjb2xsZWN0aW9uTWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25NZXRhZGF0YUFjY291bnQgPSBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShcbiAgICAgICAgY29sbGVjdGlvbk1pbnQucHVia2V5LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gYXdhaXQgTWludC5jcmVhdGVNaW50KFxuICAgICAgICBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBNaW50LmNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIGNvbGxlY3Rpb25NaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25zID0ge1xuICAgICAgICBjb2xsZWN0aW9uTW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yTmZ0IiwgIlNwbFRva2VuIiwgIlJlZ3VsYXJOZnQiXQp9Cg== \ No newline at end of file diff --git a/packages/suite-regular-nft/src/burn.ts b/packages/suite-regular-nft/src/burn.ts index b51526345..20500e4d5 100644 --- a/packages/suite-regular-nft/src/burn.ts +++ b/packages/suite-regular-nft/src/burn.ts @@ -1,8 +1,8 @@ import { Result } from '~/shared'; import { Pubkey, Secret } from '~/types/account'; import { SplToken } from '~/suite-spl-token'; -import { AuthorityOptions } from '~/types/shared'; import { CommonStructure } from '~/types/transaction-builder'; +import { BurnOptions } from '~/types/regular-nft'; export namespace RegularNft { const NFT_AMOUNT = 1; @@ -11,12 +11,19 @@ export namespace RegularNft { export const burn = ( mint: Pubkey, owner: Pubkey, - signer: Secret, - options: Partial = {}, + ownerOrMultisig: Secret[], + options: Partial = {}, ): Result => { - const feePayer = options.feePayer ? options.feePayer : signer; - return SplToken.burn(mint, owner, [signer], NFT_AMOUNT, NFT_DECIMALS, { - feePayer, - }); + const feePayer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + return SplToken.burn( + mint, + owner, + ownerOrMultisig, + NFT_AMOUNT, + NFT_DECIMALS, + { + feePayer, + }, + ); }; } diff --git a/packages/suite-regular-nft/src/gas-less-mint.ts b/packages/suite-regular-nft/src/gas-less-mint.ts index 49d5d1be0..450c68fb9 100644 --- a/packages/suite-regular-nft/src/gas-less-mint.ts +++ b/packages/suite-regular-nft/src/gas-less-mint.ts @@ -17,8 +17,7 @@ export namespace RegularNft { /** * Upload content and NFT mint with Partial Sign * - * @param {Pubkey} owner // first minted owner - * @param {Secret} signer // owner's Secret + * @param {Secret} owner // owner's Secret * @param {UserSideInput.NftMetadata} input * { * name: string // nft content name @@ -41,8 +40,7 @@ export namespace RegularNft { * @return Promise> */ export const gasLessMint = async ( - owner: Pubkey, - signer: Secret, + owner: Secret, input: InputNftMetadata, feePayer: Pubkey, options: Partial = {}, @@ -54,7 +52,9 @@ export namespace RegularNft { } const storageType = input.storageType || DEFAULT_STORAGE_TYPE; - const sellerFeeBasisPoints = Converter.Royalty.intoInfra(input.royalty); + const royalty = input.royalty ? input.royalty : 0; + const sellerFeeBasisPoints = Converter.Royalty.intoInfra(royalty); + const ownerPublickey = owner.toKeypair().publicKey; //--- porperties, Upload content --- let uri = ''; @@ -112,7 +112,7 @@ export namespace RegularNft { const mint = Account.Keypair.create(); const insts = await Mint.createMint( mint.toPublicKey(), - owner.toPublicKey(), + ownerPublickey, datav2, feePayer.toPublicKey(), isMutable, @@ -123,7 +123,7 @@ export namespace RegularNft { insts.push( Mint.createDeleagate( mint.toPublicKey(), - owner.toPublicKey(), + ownerPublickey, options.freezeAuthority.toPublicKey(), ), ); @@ -138,7 +138,7 @@ export namespace RegularNft { insts.forEach((inst) => tx.add(inst)); tx.recentBlockhash = blockhashObj.blockhash; - [signer, mint].forEach((signer) => tx.partialSign(signer.toKeypair())); + [owner, mint].forEach((signer) => tx.partialSign(signer.toKeypair())); const serializedTx = tx.serialize({ requireAllSignatures: false, diff --git a/packages/suite-regular-nft/src/gas-less-transfer.ts b/packages/suite-regular-nft/src/gas-less-transfer.ts index 77dbddcea..e118af340 100644 --- a/packages/suite-regular-nft/src/gas-less-transfer.ts +++ b/packages/suite-regular-nft/src/gas-less-transfer.ts @@ -9,16 +9,14 @@ export namespace RegularNft { export const gasLessTransfer = async ( mint: Pubkey, - owner: Pubkey, + owner: Secret, dest: Pubkey, - signers: Secret[], feePayer: Pubkey, ): Promise> => { return SplToken.gasLessTransfer( mint, owner, dest, - signers, NFT_AMOUNT, NFT_DECIMALS, feePayer, diff --git a/packages/suite-regular-nft/src/mint-collection.ts b/packages/suite-regular-nft/src/mint-collection.ts index afa3baf00..efe2fe9a7 100644 --- a/packages/suite-regular-nft/src/mint-collection.ts +++ b/packages/suite-regular-nft/src/mint-collection.ts @@ -15,8 +15,7 @@ import { MintStructure } from '~/types/transaction-builder'; * create a collection * This function needs only 1 call * - * @param {Pubkey} owner - * @param {Secret} signer + * @param {Secret} owner * @param {InputNftMetadata} input * @param {Partial} options * @return Promise> @@ -25,8 +24,7 @@ export namespace RegularNft { export const DEFAULT_COLLECTION_SIZE = 0; const DEFAULT_STORAGE_TYPE = 'nftStorage'; export const mintCollection = ( - owner: Pubkey, - signer: Secret, + owner: Secret, input: InputNftMetadata, options: Partial = {}, ): Promise> => { @@ -37,8 +35,9 @@ export namespace RegularNft { } const { freezeAuthority, feePayer, collectionSize } = options; - const payer = feePayer ? feePayer : signer; + const payer = feePayer ? feePayer : owner; const storageType = input.storageType || DEFAULT_STORAGE_TYPE; + const ownerPublicKey = owner.toKeypair().publicKey; //--- porperties, Upload content --- let properties; @@ -104,7 +103,7 @@ export namespace RegularNft { const instructions = await Mint.createMint( collectionMint.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, datav2, payer.toKeypair().publicKey, isMutable, @@ -115,7 +114,7 @@ export namespace RegularNft { instructions.push( Mint.createDeleagate( collectionMint.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, freezeAuthority.toPublicKey(), ), ); @@ -123,7 +122,7 @@ export namespace RegularNft { const collections = { collectionMetadata: collectionMetadataAccount, - collectionAuthority: signer.toKeypair().publicKey, + collectionAuthority: owner.toKeypair().publicKey, collectionMint: collectionMint.toKeypair().publicKey, }; @@ -137,7 +136,7 @@ export namespace RegularNft { return new TransactionBuilder.Mint( instructions, - [signer.toKeypair(), collectionMint.toKeypair()], + [owner.toKeypair(), collectionMint.toKeypair()], payer.toKeypair(), collectionMint.pubkey, ); diff --git a/packages/suite-regular-nft/src/mint.ts b/packages/suite-regular-nft/src/mint.ts index 26f19c33c..9fb7a1ea0 100644 --- a/packages/suite-regular-nft/src/mint.ts +++ b/packages/suite-regular-nft/src/mint.ts @@ -15,7 +15,7 @@ import { TOKEN_PROGRAM_ID, } from '@solana/spl-token'; import { debugLog, Result, Try, unixTimestamp } from '~/shared'; -import { Pubkey, Secret } from '~/types/account'; +import { Secret } from '~/types/account'; import { TransactionBuilder } from '~/transaction-builder'; import { MintStructure } from '~/types/transaction-builder'; import { Node } from '~/node'; @@ -154,8 +154,7 @@ export namespace RegularNft { /** * Upload content and NFT mint * - * @param {Pubkey} owner // first minted owner - * @param {Secret} signer // owner's Secret + * @param {Secret} owner // owner's Secret * @param {InputNftMetadata} input * { * name: string // nft content name @@ -177,8 +176,7 @@ export namespace RegularNft { * @return Promise> */ export const mint = async ( - owner: Pubkey, - signer: Secret, + owner: Secret, input: InputNftMetadata, options: Partial = {}, ): Promise> => { @@ -188,8 +186,9 @@ export namespace RegularNft { throw valid.error; } const { feePayer, freezeAuthority } = options; - const payer = feePayer ? feePayer : signer; + const payer = feePayer ? feePayer : owner; const storageType = input.storageType || DEFAULT_STORAGE_TYPE; + const ownerPublicKey = owner.toKeypair().publicKey; // porperties, Upload content let properties; @@ -263,7 +262,7 @@ export namespace RegularNft { const instructions = await createMint( mint.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, datav2, payer.toKeypair().publicKey, isMutable, @@ -274,7 +273,7 @@ export namespace RegularNft { instructions.push( createDeleagate( mint.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, freezeAuthority.toPublicKey(), ), ); @@ -291,7 +290,7 @@ export namespace RegularNft { ); } - const keypairs = [signer.toKeypair(), mint.toKeypair()]; + const keypairs = [owner.toKeypair(), mint.toKeypair()]; // creator --- if (input.creators) { diff --git a/packages/suite-regular-nft/src/thaw.ts b/packages/suite-regular-nft/src/thaw.ts index 6b58e45e7..729098a36 100644 --- a/packages/suite-regular-nft/src/thaw.ts +++ b/packages/suite-regular-nft/src/thaw.ts @@ -4,7 +4,7 @@ import { TransactionBuilder } from '~/transaction-builder'; import { Account } from '~/account'; import { getAssociatedTokenAddressSync } from '@solana/spl-token'; import { createThawDelegatedAccountInstruction } from '@metaplex-foundation/mpl-token-metadata'; -import { AuthorityOptions } from '~/types/shared'; +import { ThawOptions } from '~/types/regular-nft'; import { CommonStructure } from '~/types/transaction-builder'; export namespace RegularNft { @@ -15,13 +15,13 @@ export namespace RegularNft { * @param {Pubkey} mint // mint address * @param {Pubkey} owner // current owner * @param {Secret} freezeAuthority // setted freeze authority of nft - * @param {AuthorityOptions} options // options + * @param {ThawOptions} options // options */ export const thaw = ( mint: Pubkey, owner: Pubkey, freezeAuthority: Secret, - options: Partial = {}, + options: Partial = {}, ): Result, Error> => { return Try(() => { const payer = options.feePayer ? options.feePayer : freezeAuthority; diff --git a/packages/suite-regular-nft/src/transfer.ts b/packages/suite-regular-nft/src/transfer.ts index 6a3c6fbcd..bfe85a5e3 100644 --- a/packages/suite-regular-nft/src/transfer.ts +++ b/packages/suite-regular-nft/src/transfer.ts @@ -1,7 +1,7 @@ import { SplToken } from '~/suite-spl-token'; import { Result } from '~/shared'; import { Pubkey, Secret } from '~/types/account'; -import { AuthorityOptions } from '~/types/shared'; +import { TransferOptions } from '~/types/regular-nft'; import { CommonStructure } from '~/types/transaction-builder'; export namespace RegularNft { @@ -12,14 +12,14 @@ export namespace RegularNft { mint: Pubkey, owner: Pubkey, dest: Pubkey, - signers: Secret[], - options: Partial = {}, + ownerOrMultisig: Secret[], + options: Partial = {}, ): Promise> => { return SplToken.transfer( mint, owner, dest, - signers, + ownerOrMultisig, NFT_AMOUNT, NFT_DECIMALS, options, diff --git a/packages/suite-regular-nft/test/burn.test.ts b/packages/suite-regular-nft/test/burn.test.ts index 5f56096e3..9238ffbad 100644 --- a/packages/suite-regular-nft/test/burn.test.ts +++ b/packages/suite-regular-nft/test/burn.test.ts @@ -17,7 +17,6 @@ test('[Nft Storage] mint nft and nft burn', async (t) => { const owner = Account.Keypair.create(); const asset = RandomAsset.get(); const inst1 = await RegularNft.mint( - owner.pubkey, owner.secret, { filePath: asset.filePath as string, @@ -37,10 +36,13 @@ test('[Nft Storage] mint nft and nft burn', async (t) => { t.log('# sig:', ok); return ok; }, - (ng: Error) => t.fail(ng.message), + (ng: Error) => { + console.error(ng); + t.fail(ng.message); + }, ); - const inst2 = RegularNft.burn(mint!, owner.pubkey, owner.secret, { + const inst2 = RegularNft.burn(mint!, owner.pubkey, [owner.secret], { feePayer: feePayer.secret, }); (await inst2.submit()).match( diff --git a/packages/suite-regular-nft/test/freeze-thaw.test.ts b/packages/suite-regular-nft/test/freeze-thaw.test.ts index 1f4355fac..19323a24e 100644 --- a/packages/suite-regular-nft/test/freeze-thaw.test.ts +++ b/packages/suite-regular-nft/test/freeze-thaw.test.ts @@ -20,7 +20,6 @@ test('Freezing and Thawing a target nft', async (t) => { const freezeAuthority = Account.Keypair.create(); const asset = RandomAsset.get(); const inst1 = await RegularNft.mint( - owner.pubkey, owner.secret, { filePath: asset.filePath as string, diff --git a/packages/suite-regular-nft/test/gas-less-mint.test.ts b/packages/suite-regular-nft/test/gas-less-mint.test.ts index ac8af2d0b..16a60c467 100644 --- a/packages/suite-regular-nft/test/gas-less-mint.test.ts +++ b/packages/suite-regular-nft/test/gas-less-mint.test.ts @@ -21,7 +21,6 @@ test('[Nft Storage] mint nft with fee payer', async (t) => { const freezeAuthority = Account.Keypair.create(); const asset = RandomAsset.get(); const serialized = await RegularNft.gasLessMint( - owner.pubkey, owner.secret, { filePath: asset.filePath as string, @@ -74,7 +73,6 @@ test('[Arweave] use case arweave', async (t) => { const uri = uploaded.value; const serialized = await RegularNft.gasLessMint( - owner.pubkey, owner.secret, { uri, @@ -103,7 +101,6 @@ test('[Error]Raise parameter error when not need uri or filePath', async (t) => const owner = Account.Keypair.create(); const asset = RandomAsset.get(); const res = await RegularNft.gasLessMint( - owner.pubkey, owner.secret, { name: asset.name!, diff --git a/packages/suite-regular-nft/test/mint-collection.test.ts b/packages/suite-regular-nft/test/mint-collection.test.ts index dc9e023a4..300cb136e 100644 --- a/packages/suite-regular-nft/test/mint-collection.test.ts +++ b/packages/suite-regular-nft/test/mint-collection.test.ts @@ -14,7 +14,6 @@ test.before(async () => { test('Create collection', async (t) => { const inst = await RegularNft.mintCollection( - source.pubkey, source.secret, { name: 'CollectionNFT', @@ -42,7 +41,6 @@ test('Create collection', async (t) => { test('Create collection with feePayer', async (t) => { const inst = await RegularNft.mintCollection( - source.pubkey, source.secret, { name: 'CollectionNFT', diff --git a/packages/suite-regular-nft/test/mint.test.ts b/packages/suite-regular-nft/test/mint.test.ts index 2cec84945..8f910f5a4 100644 --- a/packages/suite-regular-nft/test/mint.test.ts +++ b/packages/suite-regular-nft/test/mint.test.ts @@ -20,7 +20,6 @@ test.before(async () => { test('[Arweave] mint nft with fee payer', async (t) => { const asset = RandomAsset.get(); const res = await RegularNft.mint( - source.pubkey, source.secret, { filePath: asset.filePath as string, @@ -51,7 +50,6 @@ test('[Nft Storage] mint nft with fee payer', async (t) => { const owner = Account.Keypair.create(); const asset = RandomAsset.get(); const res = await RegularNft.mint( - owner.pubkey, owner.secret, { filePath: asset.filePath as string, @@ -123,7 +121,6 @@ test('[Nft Storage] mint nft with many optional datas, verified collection', asy }; const res = await RegularNft.mint( - owner.pubkey, owner.secret, { filePath: asset.filePath as string, @@ -156,7 +153,7 @@ test('[Nft Storage] mint nft with many optional datas, verified collection', asy }); test('[Error]Raise validation error when upload meta data', async (t) => { - const res = await RegularNft.mint(source.pubkey, source.secret, { + const res = await RegularNft.mint(source.secret, { filePath: '', name: '', symbol: 'LONG-SYMBOL-LONG', diff --git a/packages/suite-regular-nft/test/transfer.test.ts b/packages/suite-regular-nft/test/transfer.test.ts index 8a404f07a..2edbcef64 100644 --- a/packages/suite-regular-nft/test/transfer.test.ts +++ b/packages/suite-regular-nft/test/transfer.test.ts @@ -26,7 +26,6 @@ test('Transfer nft', async (t) => { }; const mint = await RegularNft.mint( - source.pubkey, source.secret, { filePath: asset.filePath as string, diff --git a/packages/suite-sol-native/dist/index.d.mts b/packages/suite-sol-native/dist/index.d.mts index b55835898..9a761b0ea 100644 --- a/packages/suite-sol-native/dist/index.d.mts +++ b/packages/suite-sol-native/dist/index.d.mts @@ -642,9 +642,9 @@ type TransferOptions = { }; declare const SolNative: { - transferWithMultisig: (owner: Pubkey, dest: Pubkey, signers: Secret[], amount: number, options?: Partial) => Promise>; - transfer: (source: Pubkey, dest: Pubkey, signers: Secret[], amount: number, options?: Partial) => Result; - gasLessTransfer: (owner: Pubkey, dest: Pubkey, signers: Secret[], amount: number, feePayer: Pubkey) => Promise>; + transferWithMultisig: (owner: Pubkey, dest: Pubkey, ownerOrMultisig: Secret[], amount: number, options?: Partial) => Promise>; + transfer: (source: Pubkey, dest: Pubkey, ownerOrMultisig: Secret[], amount: number, options?: Partial) => Result; + gasLessTransfer: (owner: Secret, dest: Pubkey, amount: number, feePayer: Pubkey) => Promise>; findByOwner: (owner: Pubkey) => Promise>; }; diff --git a/packages/suite-sol-native/dist/index.d.ts b/packages/suite-sol-native/dist/index.d.ts index b55835898..9a761b0ea 100644 --- a/packages/suite-sol-native/dist/index.d.ts +++ b/packages/suite-sol-native/dist/index.d.ts @@ -642,9 +642,9 @@ type TransferOptions = { }; declare const SolNative: { - transferWithMultisig: (owner: Pubkey, dest: Pubkey, signers: Secret[], amount: number, options?: Partial) => Promise>; - transfer: (source: Pubkey, dest: Pubkey, signers: Secret[], amount: number, options?: Partial) => Result; - gasLessTransfer: (owner: Pubkey, dest: Pubkey, signers: Secret[], amount: number, feePayer: Pubkey) => Promise>; + transferWithMultisig: (owner: Pubkey, dest: Pubkey, ownerOrMultisig: Secret[], amount: number, options?: Partial) => Promise>; + transfer: (source: Pubkey, dest: Pubkey, ownerOrMultisig: Secret[], amount: number, options?: Partial) => Result; + gasLessTransfer: (owner: Secret, dest: Pubkey, amount: number, feePayer: Pubkey) => Promise>; findByOwner: (owner: Pubkey) => Promise>; }; diff --git a/packages/suite-sol-native/dist/index.js b/packages/suite-sol-native/dist/index.js index 00094be0d..ccde1e37f 100644 --- a/packages/suite-sol-native/dist/index.js +++ b/packages/suite-sol-native/dist/index.js @@ -1796,23 +1796,22 @@ var import_web310 = require("@solana/web3.js"); var SolNative2; ((SolNative6) => { const RADIX = 10; - SolNative6.gasLessTransfer = async (owner, dest, signers, amount, feePayer) => { + SolNative6.gasLessTransfer = async (owner, dest, amount, feePayer) => { return Try(async () => { const blockHashObj = await Node.getConnection().getLatestBlockhash(); + const ownerPublicKey = owner.toKeypair().publicKey; const tx = new import_web310.Transaction({ blockhash: blockHashObj.blockhash, lastValidBlockHeight: blockHashObj.lastValidBlockHeight, feePayer: feePayer.toPublicKey() }).add( import_web310.SystemProgram.transfer({ - fromPubkey: owner.toPublicKey(), + fromPubkey: ownerPublicKey, toPubkey: dest.toPublicKey(), lamports: parseInt(`${amount.toLamports()}`, RADIX) }) ); - signers.forEach((signer) => { - tx.partialSign(signer.toKeypair()); - }); + tx.partialSign(owner.toKeypair()); const serializedTx = tx.serialize({ requireAllSignatures: false }); @@ -1827,17 +1826,17 @@ var import_web311 = require("@solana/web3.js"); var SolNative3; ((SolNative6) => { const RADIX = 10; - SolNative6.transfer = (source, dest, signers, amount, options = {}) => { + SolNative6.transfer = (source, dest, ownerOrMultisig, amount, options = {}) => { return Try(() => { const inst = import_web311.SystemProgram.transfer({ fromPubkey: source.toPublicKey(), toPubkey: dest.toPublicKey(), lamports: parseInt(`${amount.toLamports()}`, RADIX) }); - const payer = options.feePayer ? options.feePayer.toKeypair() : signers[0].toKeypair(); + const payer = options.feePayer ? options.feePayer.toKeypair() : ownerOrMultisig[0].toKeypair(); return new TransactionBuilder6.Common( [inst], - signers.map((s) => s.toKeypair()), + ownerOrMultisig.map((s) => s.toKeypair()), payer ); }); @@ -1849,11 +1848,11 @@ var import_spl_token2 = require("@solana/spl-token"); var SolNative4; ((SolNative6) => { const RADIX = 10; - SolNative6.transferWithMultisig = async (owner, dest, signers, amount, options = {}) => { + SolNative6.transferWithMultisig = async (owner, dest, ownerOrMultisig, amount, options = {}) => { return Try(async () => { const connection = Node.getConnection(); - const payer = options.feePayer ? options.feePayer : signers[0]; - const keypairs = signers.map((s) => s.toKeypair()); + const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); const wrapped = await (0, import_spl_token2.createWrappedNativeAccount)( connection, payer.toKeypair(), @@ -1901,7 +1900,7 @@ var SolNative4; ); return new TransactionBuilder6.Common( instructions, - signers.map((s) => s.toKeypair()), + ownerOrMultisig.map((s) => s.toKeypair()), payer.toKeypair() ); }); @@ -1937,4 +1936,4 @@ var SolNative5 = { sleep, unixTimestamp }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvY29uc3RhbnRzLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2JhdGNoLnRzIiwgIi4uLy4uL25vZGUvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbW1vbi50cyIsICIuLi8uLi9zaGFyZWQvc3JjL3NoYXJlZC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9taW50LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3BhcnRpYWwtc2lnbi50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jYWxjdWxhdGUtdHhzaXplLnRzIiwgIi4uLy4uL3R5cGVzL3NyYy9nbG9iYWwvaW5kZXgudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9hc3NvY2lhdGVkLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvcmVzdWx0LnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvY29sbGVjdGlvb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kJ1aWxkZXIge1xuICBleHBvcnQgY2xhc3MgQmF0Y2gge1xuICAgIHN1Ym1pdCA9IGFzeW5jIChcbiAgICAgIGFycjogQ29tbW9uLkNvbW1vbltdIHwgTWludC5NaW50W10sXG4gICAgKTogUHJvbWlzZTxSZXN1bHQ8VHJhbnNhY3Rpb25TaWduYXR1cmUsIEVycm9yPj4gPT4ge1xuICAgICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICAgIGxldCBpID0gMDtcbiAgICAgICAgZm9yIChjb25zdCBhIG9mIGFycikge1xuICAgICAgICAgIGlmICghYS5pbnN0cnVjdGlvbnMgJiYgIWEuc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoYSl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGFyci5mbGF0TWFwKChhKSA9PiBhLmluc3RydWN0aW9ucyk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gYXJyLmZpbHRlcigoYSkgPT4gYS5mZWVQYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB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CA9IDEwO1xuICAgIGNvbnN0IFJFVFJZX1NMRUVQX1RJTUUgPSAzO1xuICAgIC8vQGludGVybmFsXG4gICAgY29uc3QgZ2V0ID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgICBhbGxvd093bmVyT2ZmQ3VydmUgPSBmYWxzZSxcbiAgICApOiBQcm9taXNlPHN0cmluZyB8IENvbW1vblN0cnVjdHVyZTxQdWJrZXk+PiA9PiB7XG4gICAgICBjb25zdCByZXMgPSBhd2FpdCBtYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG5ldyBLZXlwYWlyLktleXBhaXIoeyBzZWNyZXQ6IGZlZVBheWVyIH0pLnB1YmtleSxcbiAgICAgICAgYWxsb3dPd25lck9mZkN1cnZlLFxuICAgICAgKTtcblxuICAgICAgaWYgKCFyZXMuaW5zdCkge1xuICAgICAgICByZXR1cm4gcmVzLnRva2VuQWNjb3VudDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uPFB1YmtleT4oXG4gICAgICAgIFtyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9I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xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgYnMgZnJvbSAnYnM1OCc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgQWNjb3VudCB7XG4gIGV4cG9ydCBjbGFzcyBLZXlwYWlyIHtcbiAgICBzZWNyZXQ6IFNlY3JldDtcbiAgICBwdWJrZXk6IFB1YmtleTtcblxuICAgIGNvbnN0cnVjdG9yKHBhcmFtczogeyBwdWJrZXk/OiBQdWJrZXk7IHNlY3JldDogU2VjcmV0IH0pIHtcbiAgICAgIGlmICghcGFyYW1zLnB1YmtleSkge1xuICAgICAgIC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sbGVjdGlvbiB7XG4gICAgZXhwb3J0IGNvbnN0IGludG9JbmZyYSA9IChcbiAgICAgIGlucHV0OiBPcHRpb248SW5wdXRDb2xsZWN0aW9uPiB8IHVuZGVmaW5lZCxcbiAgICApOiBPcHRpb248SW50ZXJuYWxDb2xsZWN0aW9uPiA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4ge1xuICAgICAgICBrZXk6IGlucHV0LnRvUHVibGljS2V5KCksXG4gICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgIH07XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ29sbGVjdGlvbj4sXG4gICAgKTogQ29sbGVjdGlvbiB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4ge1xuICAgICAgICBhZGRyZXNzOiBvdXRwdXQua2V5LnRvU3RyaW5nKCksXG4gICAgICAgIHZlcmlmaWVkOiBvdXRwdXQudmVyaWZpZWQsXG4gICAgICB9O1xuICAgIH07XG4gIH1cblxuICBleHBvcnQgbmFtZXNwYWNlIENvbGxlY3Rpb25NaW50IHtcbiAgICBleHBvcnQgY29uc3QgaW50b1VzZXIgPSAob3V0cHV0OiBHcm91cGluZ1tdKTogUHVia2V5ID0+IHtcbiAgICAgIGNvbnN0IHJlcyA9IG91dHB1dC5maW5kKCh2YWx1ZSkgPT4ge1xuICAgICAgICBpZiAodmFsdWUuZ3JvdXBfa2V5ID09PSAnY29sbGVjdGlvbicpIHtcbiAgICAgICAgICByZXR1cm4gdmFsdWUuZ3JvdXBfdmFsdWU7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgcmV0dXJuIHJlcyA/IHJ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gICAgICAgc3dpdGNoIChrZXkpIHtcbiAgICAgICAgICBjYXNlICdpbWFnZSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLmltYWdlKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzSW1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmF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ICAgfSxcbiAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgLy8gc3BsLXRva2VuIG9yIHN5c3RlbVxuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgJiZcbiAgICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgIT09IGluc3RydWN0aW9uVHJhbnNmZXJbJ3Byb2dyYW0nXVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgZGVidWdMb2coXG4gICAgICAgICAgICAgICAgICAgICcjIEZpbHRlclR5cGUuTWVtbyBicmVhayBpbnN0cnVjdGlvbjogJyxcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCBtZW1vIG9ubHkgdHJhbnNhY3Rpb25cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk9ubHlNZW1vOiB7XG4gICAgICAgICAgICAgIGlmIChGaWx0ZXJPcHRpb25zLk1lbW8ucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSkge1xuICAgICAgICAgICAgICAgIGxldCBpbnN0cnVjdGlvblRyYW5zZmVyO1xuXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5NaW50OiB7XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1pbnQuaW50b1VzZXJTaWRlKGluc3RydWN0aW9uLCB0eE1ldGEpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLlRyYW5zZmVyOlxuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgbW9kdWxlTmFtZSA9PT0gaW5zdHJ1Y3Rpb24ucHJvZ3JhbSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaWYgKGluc3RydWN0aW9uLnBhcnNlZC50eXBlID09PSAndHJhbnNmZXJDaGVja2VkJykge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2ZlckNoZWNrZWQuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2Zlci5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICByZXR1cm4gaGlzdG9yeTtcbiAgICB9O1xufVxuIiwgImltcG9ydCB7IFBhcnNlZEFjY291bnREYXRhIH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFJlc3VsdCwgVHJ5IH0gZnJvbSAnfi9zaGFyZWQnO1xuaW1wb3J0IHsgTm9kZSB9IGZyb20gJ34vbm9kZSc7XG5pbXBvcnQgeyBQdWJrZXksIE93bmVySW5mbyB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgeyBUcmFuc2FjdGlvbkZpbHRlciB9IGZyb20gJ34vdHJhbnNhY3Rpb24tZmlsdGVyJ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blxuICAgICAgZGVidWdMb2coJyMgc291cmNlVG9rZW46ICcsIHNvdXJjZVRva2VuKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIHRva2VuLnRvU3RyaW5nKCksXG4gICAgICAgIHdyYXBwZWQudG9TdHJpbmcoKSxcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBkZXN0VG9rZW46ICcsIGRlc3RUb2tlbik7XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVUcmFuc2Zlckluc3RydWN0aW9uKFxuICAgICAgICAgIHNvdXJjZVRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgZGVzdFRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBwYXJzZUludChgJHthbW91bnR9YCwgUkFESVgpLCAvLyBObyBsYW1wb3J0cywgaXRzIHNvbFxuICAgICAgICAgIGtleXBhaXJzLFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZUNsb3NlQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHdyYXBwZWQsXG4gICAgICAgICAgZGVzdC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAga2V5cGFpcnMsXG4gICAgICAgICksXG4gICAgICApO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24oXG4gICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgc2lnbmVycy5tYXAoKHMpID0+IHMudG9LZXlwYWlyKCkpLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiA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zdWx0JztcblxuZXhwb3J0IG5hbWVzcGFjZSBUcmFuc2FjdGlvbkJ1aWxkZXIge1xuICBleHBvcnQgY2xhc3MgQmF0Y2gge1xuICAgIHN1Ym1pdCA9IGFzeW5jIChcbiAgICAgIGFycjogQ29tbW9uLkNvbW1vbltdIHwgTWludC5NaW50W10sXG4gICAgKTogUHJvbWlzZTxSZXN1bHQ8VHJhbnNhY3Rpb25TaWduYXR1cmUsIEVycm9yPj4gPT4ge1xuICAgICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICAgIGxldCBpID0gMDtcbiAgICAgICAgZm9yIChjb25zdCBhIG9mIGFycikge1xuICAgICAgICAgIGlmICghYS5pbnN0cnVjdGlvbnMgJiYgIWEuc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoYSl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGFyci5mbGF0TWFwKChhKSA9PiBhLmluc3RydWN0aW9ucyk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gYXJyLmZpbHRlcigoYSkgPT4gYS5mZWVQYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZV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zb2NpYXRlZCB7XG4gICAgY29uc3QgUkVUUllfT1ZFUl9MSU1JVCA9IDEwO1xuICAgIGNvbnN0IFJFVFJZX1NMRUVQX1RJTUUgPSAzO1xuICAgIC8vQGludGVybmFsXG4gICAgY29uc3QgZ2V0ID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgICBhbGxvd093bmVyT2ZmQ3VydmUgPSBmYWxzZSxcbiAgICApOiBQcm9taXNlPHN0cmluZyB8IENvbW1vblN0cnVjdHVyZTxQdWJrZXk+PiA9PiB7XG4gICAgICBjb25zdCByZXMgPSBhd2FpdCBtYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG5ldyBLZXlwYWlyLktleXBhaXIoeyBzZWNyZXQ6IGZlZVBheWVyIH0pLnB1YmtleSxcbiAgICAgICAgYWxsb3dPd25lck9mZkN1cnZlLFxuICAgICAgKTtcblxuICAgICAgaWYgKCFyZXMuaW5zdCkge1xuICAgICAgICByZXR1cm4gcmVzLnRva2VuQWNjb3VudDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uPFB1YmtleT4oXG4gICAgICAgIFtyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVlUGF5ZXJ9YCk7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoUkVUUllfU0xFRVBfVElNRSk7XG4gICAgICAgIGNvdW50ZXIrKztcbiAgICAgIH1cbiAgICAgIHRocm93IEVycm9yKGByZXRyeSBhY3Rpb24gaXMgb3ZlciBsaW1pdCAke1JFVFJZX09WRVJfTElNSVR9YCk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFtNYWluIGxvZ2ljXUdldCBBc3NvY2lhdGVkIHRva2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgYnMgZnJvbSAnYnM1OCc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgQWNjb3VudCB7XG4gIGV4cG9ydCBjbGFzcyBLZXlwYWlyIHtcbiAgICBzZWNyZXQ6IFNlY3JldDtcbiAgICBwdWJrZXk6IFB1YmtleTtcblxuICAgIGNvbnN0cnVjdG9yKHBhcmFtczogeyBwdWJrZXk/OiBQdWJrZXk7IHNlY3JldDogU2VjcmV0IH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NZXNzYWdlLlNNQUxMX05VTUJFUiwgcm95YWx0eSwge1xuICAgICAgICAgIHRocmVzaG9sZDogUk9ZQUxUWV9NSU4sXG4gICAgICAgICAgY29uZGl0aW9uOiAndW5kZXJNaW4nLFxuICAgICAgICB9KTtcbiAgICAgIH0gZWxzZSBpZiAocm95YWx0eSA+IFJPWUFMVFlfTUFYKSB7XG4gICAgICAgIHRocm93IGNyZWF0ZUVycm9yKGtleSwgTWVzc2FnZS5CSUdfTlVNQkVSLCByb3lhbHR5LCB7XG4gICAgICAgICAgdGhyZXNob2xkOiBST1lBTFRZX01BWCxcbiAgICAgICAgICBjb25kaXRpb246ICdvdmVyTWF4JyxcbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgICByZXR1cm4gTWVzc2FnZS5TVUNDRVNTO1xuICAgIH0pO1xuICB9O1xuXG4gIGV4cG9ydCBjb25zdCBpc1NlbGxlckZlZUJhc2lzUG9pbnRzID0gKFxuICAgIHJveWFsdHk6IG51bWJlcixcbiAgKTogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+ID0+IHtcbiAgICByZXR1cm4gVHJ5KCgpID0+IHtcbiAgICAgIGNvbnN0IGtleSA9ICdzZWxsZXJGZWVCYXNpc1BvaW50cy9zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc7XG4gICAgICBpZiAocm95YWx0eSAhPT0gMCAmJiAhcm95YWx0eSkge1xuICAgICAgICB0aHJvdyBjcmVhdGVFcnJvcihrZXksIE1lc3NhZ2UuRU1QVFksIHJveWFsdHkpO1xuICAgICAgfVxuICAgICAgaWYgKHJveWFsdHkgPCBST1lBTFRZX01JTikge1xuICAgICAgICB0aHJvdyBjcmVhdGVFcnJvcihrZXksIE1lc3NhZ2UuU01BTExfTlVNQkVSLCByb3lhbHR5LCB7XG4gICAgICAgICAgdGhyZXNob2xkOiBST1lBTFRZX01JTixcbiAgICAgICAgICBjb25kaXRpb246ICd1bmRlck1pbicsXG4gICAgICAgIH0pO1xu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yE6IFJlc3VsdDxzdHJpbmcsIFZhbGlkYXRvckVycm9yPjtcbiAgICAgICAgc3dpdGNoIChrZXkpIHtcbiAgICAgICAgICBjYXNlICdpbWFnZSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLmltYWdlKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzSW1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXR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GlvbjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgLy8gc3BsLXRva2VuIG9yIHN5c3RlbVxuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgJiZcbiAgICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgIT09IGluc3RydWN0aW9uVHJhbnNmZXJbJ3Byb2dyYW0nXVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgZGVidWdMb2coXG4gICAgICAgICAgICAgICAgICAgICcjIEZpbHRlclR5cGUuTWVtbyBicmVhayBpbnN0cnVjdGlvbjogJyxcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCBtZW1vIG9ubHkgdHJhbnNhY3Rpb25cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk9ubHlNZW1vOiB7XG4gICAgICAgICAgICAgIGlmIChGaWx0ZXJPcHRpb25zLk1lbW8ucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSkge1xuICAgICAgICAgICAgICAgIGxldCBpbnN0cnVjdGlvblRyYW5zZmVyO1xuXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5NaW50OiB7XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1pbnQuaW50b1VzZXJTaWRlKGluc3RydWN0aW9uLCB0eE1ldGEpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLlRyYW5zZmVyOlxuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgbW9kdWxlTmFtZSA9PT0gaW5zdHJ1Y3Rpb24ucHJvZ3JhbSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaWYgKGluc3RydWN0aW9uLnBhcnNlZC50eXBlID09PSAndHJhbnNmZXJDaGVja2VkJykge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2ZlckNoZWNrZWQuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2Zlci5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICByZXR1cm4gaGlzdG9yeTtcbiAgICB9O1xufVxuIiwgImltcG9ydCB7IFBhcnNlZEFjY291bnREYXRhIH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFJlc3VsdCwgVHJ5IH0gZnJvbSAnfi9zaGFyZWQnO1xuaW1wb3J0IHsgTm9kZSB9IGZyb20gJ34vbm9kZSc7XG5pbXBvcnQgeyBQdWJrZXksIE93bmVySW5mbyB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgeyBUcmFuc2FjdGl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mFuc2Zlck9wdGlvbnM+ID0ge30sXG4gICk6IFByb21pc2U8UmVzdWx0PENvbW1vblN0cnVjdHVyZSwgRXJyb3I+PiA9PiB7XG4gICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCBjb25uZWN0aW9uID0gTm9kZS5nZXRDb25uZWN0aW9uKCk7XG4gICAgICBjb25zdCBwYXllciA9IG9wdGlvbnMuZmVlUGF5ZXIgPyBvcHRpb25zLmZlZVBheWVyIDogb3duZXJPck11bHRpc2lnWzBdO1xuICAgICAgY29uc3Qga2V5cGFpcnMgPSBvd25lck9yTXVsdGlzaWcubWFwKChzKSA9PiBzLnRvS2V5cGFpcigpKTtcbiAgICAgIGNvbnN0IHdyYXBwZWQgPSBhd2FpdCBjcmVhdGVXcmFwcGVkTmF0aXZlQWNjb3VudChcbiAgICAgICAgY29ubmVjdGlvbixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIHBhcnNlSW50KGAke2Ftb3VudC50b0xhbXBvcnRzKCl9YCwgUkFESVgpLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgd3JhcHBlZCBzb2w6ICcsIHdyYXBwZWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IFtdO1xuXG4gICAgICBjb25zdCB0b2tlbiA9IGF3YWl0IGNyZWF0ZU1pbnQoXG4gICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAwLFxuICAgICAgKTtcblxuICAgICAgY29uc3Qgc291cmNlVG9rZW4gPSBhd2FpdCBBY2NvdW50LkFzc29jaWF0ZWQucmV0cnlHZXRPckNyZWF0ZShcbiAgICAgICAgdG9rZW4udG9TdHJpbmcoKSxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIHBheWVyLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgc291cmNlVG9rZW46ICcsIHNvdXJjZVRva2VuKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIHRva2VuLnRvU3RyaW5nKCksXG4gICAgICAgIHdyYXBwZWQudG9TdHJpbmcoKSxcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBkZXN0VG9rZW46ICcsIGRlc3RUb2tlbik7XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVUcmFuc2Zlckluc3RydWN0aW9uKFxuICAgICAgICAgIHNvdXJjZVRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgZGVzdFRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBwYXJzZUludChgJHthbW91bnR9YCwgUkFESVgpLCAvLyBObyBsYW1wb3J0cywgaXRzIHNvbFxuICAgICAgICAgIGtleXBhaXJzLFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZUNsb3NlQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHdyYXBwZWQsXG4gICAgICAgICAgZGVzdC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAga2V5cGFpcnMsXG4gICAgICAgICksXG4gICAgICApO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24oXG4gICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgb3duZXJPck11bHRpc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OYXRpdmUiLCAiaW1wb3J0X3dlYjMiLCAiU29sTmF0aXZlIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfd2ViMyIsICJTb2xOYXRpdmUiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImltcG9ydF9zcGxfdG9rZW4iLCAiU29sTmF0aXZlIiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlNvbE5hdGl2ZSJdCn0K \ No newline at end of file diff --git a/packages/suite-sol-native/dist/index.mjs b/packages/suite-sol-native/dist/index.mjs index e57abe24a..f09adcf33 100644 --- a/packages/suite-sol-native/dist/index.mjs +++ b/packages/suite-sol-native/dist/index.mjs @@ -1764,23 +1764,22 @@ import { SystemProgram, Transaction as Transaction5 } from "@solana/web3.js"; var SolNative2; ((SolNative6) => { const RADIX = 10; - SolNative6.gasLessTransfer = async (owner, dest, signers, amount, feePayer) => { + SolNative6.gasLessTransfer = async (owner, dest, amount, feePayer) => { return Try(async () => { const blockHashObj = await Node.getConnection().getLatestBlockhash(); + const ownerPublicKey = owner.toKeypair().publicKey; const tx = new Transaction5({ blockhash: blockHashObj.blockhash, lastValidBlockHeight: blockHashObj.lastValidBlockHeight, feePayer: feePayer.toPublicKey() }).add( SystemProgram.transfer({ - fromPubkey: owner.toPublicKey(), + fromPubkey: ownerPublicKey, toPubkey: dest.toPublicKey(), lamports: parseInt(`${amount.toLamports()}`, RADIX) }) ); - signers.forEach((signer) => { - tx.partialSign(signer.toKeypair()); - }); + tx.partialSign(owner.toKeypair()); const serializedTx = tx.serialize({ requireAllSignatures: false }); @@ -1795,17 +1794,17 @@ import { SystemProgram as SystemProgram2 } from "@solana/web3.js"; var SolNative3; ((SolNative6) => { const RADIX = 10; - SolNative6.transfer = (source, dest, signers, amount, options = {}) => { + SolNative6.transfer = (source, dest, ownerOrMultisig, amount, options = {}) => { return Try(() => { const inst = SystemProgram2.transfer({ fromPubkey: source.toPublicKey(), toPubkey: dest.toPublicKey(), lamports: parseInt(`${amount.toLamports()}`, RADIX) }); - const payer = options.feePayer ? options.feePayer.toKeypair() : signers[0].toKeypair(); + const payer = options.feePayer ? options.feePayer.toKeypair() : ownerOrMultisig[0].toKeypair(); return new TransactionBuilder6.Common( [inst], - signers.map((s) => s.toKeypair()), + ownerOrMultisig.map((s) => s.toKeypair()), payer ); }); @@ -1822,11 +1821,11 @@ import { var SolNative4; ((SolNative6) => { const RADIX = 10; - SolNative6.transferWithMultisig = async (owner, dest, signers, amount, options = {}) => { + SolNative6.transferWithMultisig = async (owner, dest, ownerOrMultisig, amount, options = {}) => { return Try(async () => { const connection = Node.getConnection(); - const payer = options.feePayer ? options.feePayer : signers[0]; - const keypairs = signers.map((s) => s.toKeypair()); + const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); const wrapped = await createWrappedNativeAccount( connection, payer.toKeypair(), @@ -1874,7 +1873,7 @@ var SolNative4; ); return new TransactionBuilder6.Common( instructions, - signers.map((s) => s.toKeypair()), + ownerOrMultisig.map((s) => s.toKeypair()), payer.toKeypair() ); }); @@ -1909,4 +1908,4 @@ export { sleep, unixTimestamp }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc2hhcmVkL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvc2hhcmVkLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4u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DM7XG4gICAgLy9AaW50ZXJuYWxcbiAgICBjb25zdCBnZXQgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSA9IGZhbHNlLFxuICAgICk6IFByb21pc2U8c3RyaW5nIHwgQ29tbW9uU3RydWN0dXJlPFB1YmtleT4+ID0+IHtcbiAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBvd25lcixcbiAgICAgICAgbmV3IEtleXBhaXIuS2V5cGFpcih7IHNlY3JldDogZmVlUGF5ZXIgfSkucHVia2V5LFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICApO1xuXG4gICAgICBpZiAoIXJlcy5pbnN0KSB7XG4gICAgICAgIHJldHVybiByZXMudG9rZW5BY2NvdW50O1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb248UHVia2V5PihcbiAgICAgICAgW3Jlcy5pbnN0XSxcbiAgICAgICAgW10sXG4gICAgICAgIGZlZVBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICByZXMudG9rZW5BY2NvdW50ISxcbiAgICAgICk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFJldHJ5IGZ1bmN0aW9uIGlmIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtTZWNyZXR9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IHJldHJ5R2V0T3JDcmVhdGUgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICApOiBQcm9taXNlPHN0cmluZz4gPT4ge1xuICAgICAgbGV0IGNvdW50ZXIgPSAxO1xuICAgICAgd2hpbGUgKGNvdW50ZXIgPCBSRVRSWV9PVkVSX0xJTUlUKSB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgY29uc3QgaW5zdCA9IGF3YWl0IGdldChtaW50LCBvd25lciwgZmVlUGF5ZXIsIHRydWUpO1xuXG4gICAgICAgICAgaWYgKGluc3QgJiYgdHlwZW9mIGluc3QgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBpbnN0KTtcbiAgICAgICAgICAgIHJldHVybiBpbnN0O1xuICAgICAgICAgIH0gZWxzZSBpZiAoaW5zdCBpbnN0YW5jZW9mIFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24pIHtcbiAgICAgICAgICAgIChhd2FpdCBpbnN0LnN1Ym1pdCgpKS5tYXAoXG4gICAgICAgICAgICAgIGFzeW5jIChvazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZ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VkVG9rZW5BY2NvdW50ID0gZ2V0QXNzb2NpYXRlZFRva2VuQWRkcmVzc1N5bmMoXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgYWxsb3dPd25lck9mZkN1cnZlLFxuICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCkpO1xuXG4gICAgICB0cnkge1xuICAgICAgICAvLyBEb250IHVzZSBSZXN1bHRcbiAgICAgICAgYXdhaXQgZ2V0QWNjb3VudChcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLmNvbW1pdG1lbnQsXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3R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ID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICA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YXJzZWRJbnN0cnVjdGlvbihpbnN0cnVjdGlvbikpIHtcbiAgICAgICAgICBzd2l0Y2ggKGZpbHRlclR5cGUpIHtcbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5NZW1vOiB7XG4gICAgICAgICAgICAgIGlmIChGaWx0ZXJPcHRpb25zLk1lbW8ucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSkge1xuICAgICAgICAgICAgICAgIGxldCBpbnN0cnVjdGlvblRyYW5zZmVyO1xuXG4gICAgICAgICAgICAgICAgLy8gZmV0Y2ggIHRyYW5zZmVyIHRyYW5zYWN0aW9uIGZvciByZWxhdGlvbmFsIG1lbW9cbiAgICAgICAgICAgICAgICB0eE1ldGEudHJhbnNhY3Rpb24ubWVzc2FnZS5pbnN0cnVjdGlvbnMuZm9yRWFjaChcbiAgICAgICAgICAgICAgICAgIChpbnN0cnVjdGlvbikgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgaXNQYXJzZWRJbnN0cnVjdGlvbihpbnN0cnVjdGlvbikgJiZcbiAgICAgICAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLnByb2dyYW0uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wcm9ncmFtLFxuICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciA9IGluc3RydWN0aW9uO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgICAgICAvLyBzcGwtdG9rZW4gb3Igc3lzdGVtXG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciAmJlxuICAgICAgICAgICAgICAgICAgbW9kdWxlTmFtZSAhPT0gaW5zdHJ1Y3Rpb25UcmFuc2ZlclsncHJvZ3JhbSddXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICBkZWJ1Z0xvZyhcbiAgICAgICAgICAgICAgICAgICAgJyMgRmlsdGVyVHlwZS5NZW1vIGJyZWFrIGluc3RydWN0aW9uOiAnLFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIGZldGNoIG1lbW8gb25seSB0cmFuc2FjdGlvblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuT25seU1lbW86IHtcbiAgICAgICAgICAgICAgaWYgKEZpbHRlck9wdGlvbnMuTWVtby5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pKSB7XG4gICAgICAgICAgICAgICAgbGV0IGluc3RydWN0aW9uVHJhbnNmZXI7XG5cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk1pbnQ6IHtcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWludC5pbnRvVXNlclNpZGUoaW5zdHJ1Y3Rpb24sIHR4TWV0YSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuVHJhbnNmZXI6XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBtb2R1bGVOYW1lID09PSBpbnN0cnVjdGlvbi5wcm9ncmFtICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBpZiAoaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgPT09ICd0cmFuc2ZlckNoZWNrZWQnKSB7XG4gICAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLlRyYW5zZmVyQ2hlY2tlZC5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLlRyYW5zZmVyLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIHJldHVybiBoaXN0b3J5O1xuICAgIH07XG59XG4iLCAiaW1wb3J0IHsgUGFyc2VkQWNjb3VudERhdGEgfSBmcm9tICdAc29sYW5hL3dlYjMuanMnO1xuaW1wb3J0IHsgUmVzdWx0LCBUcnkgfSBmcm9tICd+L3NoYXJlZCc7XG5pbXBvcnQgeyBOb2RlIH0gZnJvbSAnfi9ub2RlJztcbmltcG9ydCB7IFB1YmtleSwgT3duZXJJbmZvIH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCB7IFRyYW5zYWN0aW9uRmlsdGVyIH0gZnJvbSAnfi90cmFuc2FjdGlvbi1maWx0ZXInO1xuXG5leHBvcnQgbmFtZXNwYWNlIFNvbE5hdGl2ZSB7XG4gIGV4cG9ydCBjb25zdCBmaW5kQnlPd25lciA9IGFzeW5jIChcbiAgICBvd25lcjogUHVia2V5LFxuICApOiBQcm9taXNlPFJlc3VsdDx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G9wdGlvbnMuZmVlUGF5ZXIgPyBvcHRpb25zLmZlZVBheWVyIDogc2lnbmVyc1swXTtcbiAgICAgIGNvbnN0IGtleXBhaXJzID0gc2lnbmVycy5tYXAoKHMpID0+IHMudG9LZXlwYWlyKCkpO1xuICAgICAgY29uc3Qgd3JhcHBlZCA9IGF3YWl0IGNyZWF0ZVdyYXBwZWROYXRpdmVBY2NvdW50KFxuICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgcGFyc2VJbnQoYCR7YW1vdW50LnRvTGFtcG9ydHMoKX1gLCBSQURJWCksXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyB3cmFwcGVkIHNvbDogJywgd3JhcHBlZC50b0Jhc2U1OCgpKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gW107XG5cbiAgICAgIGNvbnN0IHRva2VuID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgY29ubmVjdGlvbixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIDAsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBzb3VyY2VUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5yZXRyeUdldE9yQ3JlYXRlKFxuICAgICAgICB0b2tlbi50b1N0cmluZygpLFxuICAgICAgICBvd25lcixcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBzb3VyY2VUb2tlbjogJywgc291cmNlVG9rZW4pO1xuXG4gICAgICBjb25zdCBkZXN0VG9rZW4gPSBhd2FpdCBBY2NvdW50LkFzc29jaWF0ZWQucmV0cnlHZXRPckNyZWF0ZShcbiAgICAgICAgdG9rZW4udG9TdHJpbmcoKSxcbiAgICAgICAgd3JhcHBlZC50b1N0cmluZygpLFxuICAgICAgICBwYXllcixcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGRlc3RUb2tlbjogJywgZGVzdFRva2VuKTtcblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZVRyYW5zZmVySW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgc291cmNlVG9rZW4udG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBkZXN0VG9rZW4udG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHBhcnNlSW50KGAke2Ftb3VudH1gLCBSQURJWCksIC8vIE5vIGxhbXBvcnRzLCBpdHMgc29sXG4gICAgICAgICAga2V5cGFpcnMsXG4gICAgICAgICksXG4gICAgICApO1xuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlQ2xvc2VBY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgd3JhcHBlZCxcbiAgICAgICAgICBkZXN0LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBrZXlwYWlycyxcbiAgICAgICAgKSxcbiAgICAgICk7XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbihcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICBzaWduZXJzLm1hcCgocykgPT4gcy50b0tleXBhaXIoKSksXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgKTtcbiAgICB9KTtcbiAgfTtcbn1cbiIsICJpbXBvcnQgeyBTb2xOYXRpdmUgYXMgRmluZCB9IGZyb20gJy4vZmluZCc7XG5pbXBvcnQgeyBTb2xOYXRpdmUgYXMgR2FzTGVzcyB9IGZyb20gJy4vZ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nRVcmwubG9jYWxob3N0O1xuICAgIH1cbiAgfTtcblxuICBleHBvcnQgY29uc3Qgc3dpdGNoQnVuZGxyID0gKGVudjogc3RyaW5nKTogc3RyaW5nID0+IHtcbiAgICBzd2l0Y2ggKGVudikge1xuICAgICAgY2FzZSBDb25zdGFudHMuQ2x1c3Rlci5wcmQ6IHtcbiAgICAgICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5CdW5kbHJVcmwucHJkLnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIHJldHVybiBDb25zdGFudHMuQnVuZGxyVXJsLmRldjtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IHN3aXRjaERhc0FwaSA9IChlbnY6IHN0cmluZyk6IHN0cmluZyA9PiB7XG4gICAgc3dpdGNoIChlbnYpIHtcbiAgICAgIGNhc2UgQ29uc3RhbnRzLkNsdXN0ZXIucHJkOiB7XG4gICAgICAgIGlmIChkYXNBcGlVcmwubGVuZ3RoIDwgMSkge1xuICAgICAgICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuREFTX0FQSV9VUkwpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuQnVuZGxyVXJsLnByZC5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBjb25zdCB1cmxzID0gQ29uc3RhbnRzLkRhc0FwaVVybC5kZXYuc3BsaXQoJywnKTtcbiAgICAgICAgY29uc3QgaW5kZXggPSBEY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nN0IGl4c1NpemUgPSB0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMucmVkdWNlKChhY2MsIGl4KSA9PiB7XG4gICAgICBpeC5rZXlzLmZvckVhY2goKHsgcHVia2V5LCBpc1NpZ25lciB9KSA9PiB7XG4gICAgICAgIGNvbnN0IHBrID0gcHVia2V5LnRvQmFzZTU4KCk7XG4gICAgICAgIGlmIChpc1NpZ25lcikgc2lnbmVycy5hZGQocGspO1xuICAgICAgICBhY2NvdW50cy5hZGQocGspO1xuICAgICAgfSk7XG5cbiAgICAgIGFjY291bnRzLmFkZChpeC5wcm9ncmFtSWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IG5JbmRleGVzID0gaXgua2V5cy5sZW5ndGg7XG4gICAgICBjb25zdCBvcGFxdWVEYXRhID0gaXguZGF0YS5sZW5ndGg7XG5cbiAgICAgIHJldHVybiAoXG4gICAgICAgIGFjYyArXG4gICAgICAgIDEgKyAvLyBQSUQgaW5kZXhcbiAgICAgICAgY29tcGFjdEFycmF5U2l6ZShuSW5kZXhlcywgMSkgK1xuICAgICAgICBjb21wYWN0QXJyYXlTaXplKG9wYXF1ZURhdGEsIDEpXG4gICAgICApO1xuICAgIH0sIDApO1xuXG4gICAgcmV0dXJuIChcbiAgICAgIGNvbXBhY3RBcnJheVNpemUoc2lnbmVycy5zaXplLCA2NCkgKyAvLyBzaWduYXR1cmVzXG4gICAgICAzICsgLy8gaGVhZGVyXG4gICAgICBjb21wYWN0QXJyYXlTaXplKGFjY291bnRzLnNpemUsIDMyKSArIC8vIGFjY291bnRzXG4gICAgICAzMiArIC8vIGJsb2NraGFzaFxuICAgICAgY29tcGFjdEhlYWRlcih0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMubGVuZ3RoKSArIC8vIGluc3RydWN0aW9uc1xuICAgICAgaXhzU2l6ZVxuICAgICk7XG4gIH07XG5cbiAgLyoqXG4gICAqIElzIG1heCB0cmFuc2FjdGlvbiBzaXplXG4gICAqIEB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JldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2coYCMgbWludDogJHttaW50fSwgb3duZXI6ICR7b3duZXJ9LCBmZWVQYXllcjogJHtmZWVQYXllcn1gKTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBzbGVlcChSRVRSWV9TTEVFUF9USU1FKTtcbiAgICAgICAgY291bnRlcisrO1xuICAgICAgfVxuICAgICAgdGhyb3cgRXJyb3IoYHJldHJ5IGFjdGlvbiBpcyBvdmVyIGxpbWl0ICR7UkVUUllfT1ZFUl9MSU1JVH1gKTtcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogW01haW4gbG9naWNdR2V0IEFzc29jaWF0ZWQgdG9rZW4gQWNjb3VudC5cbiAgICAgKiBpZiBub3QgY3JlYXRlZCwgY3JlYXRlIG5ldyB0b2tlbiBhY2NvdWludFxuICAgICAqXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG1pbnRcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gb3duZXJcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gZmVlUGF5ZXJcbiAgICAgKiBAcmV0dXJucyBQcm9taXNlPHN0cmluZz5cbiAgICAgKi9cbiAgICBleHBvcnQgY29uc3QgbWFrZU9yQ3JlYXRlSW5zdHJ1Y3Rpb24gPSBhc3luYy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ICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2Nv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c3MudG9QdWJsaWNLZXkoKS50b0J1ZmZlcigpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEJndW1TaWduZXIgPSAoKTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtCdWZmZXIuZnJvbSgnY29sbGVjdGlvbl9jcGknLCAndXRmOCcpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEFzc2V0SWQgPSAoYWRkcmVzczogUHVia2V5LCBsZWFmSW5kZXg6IG51bWJlcik6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCBub2RlID0gbmV3IEJOLkJOKGxlYWZJbmRleCk7XG4gICAgICBjb25zdCBbYXNzZXRJZF0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW1xuICAgICAgICAgIEJ1ZmZlci5mcm9tKCdhc3NldCcsICd1dGY4JyksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgVWludDhBcnJheS5mcm9tKG5vZGUudG9BcnJheSgnbGUnLCA4KSksXG4gICAgICAgIF0sXG4gICAgICAgIE1QTF9CVUJCTEVHVU1fUFJPR1JBTV9JRC50b1B1YmxpY0tleSgpLFxuICAgICAgKTtcbiAgICAgIHJldHVybiBhc3NldElkLnRvU3RyaW5nKCk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7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iAgICAgIGNvbnN0IHJlc3VsdHM6IERldGFpbHNbXSA9IFtdO1xuICAgICAga2V5cy5tYXAoKGtleSkgPT4ge1xuICAgICAgICBsZXQgcmVzITogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+O1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiA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AgICAgIClcbiAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciA9IGluc3RydWN0aW9uO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgICAgICAvLyBzcGwtdG9rZW4gb3Igc3lzdGVtXG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciAmJlxuICAgICAgICAgICAgICAgICAgbW9kdWxlTmFtZSAhPT0gaW5zdHJ1Y3Rpb25UcmFuc2ZlclsncHJvZ3JhbSddXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICBkZWJ1Z0xvZyhcbiAgICAgICAgICAgICAgICAgICAgJyMgRmlsdGVyVHlwZS5NZW1vIGJyZWFrIGluc3RydWN0aW9uOiAnLFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIGZldGNoIG1lbW8gb25seSB0cmFuc2FjdGlvblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuT25seU1lbW86IHtcbiAgICAgICAgICAgICAgaWYgKEZpbHRlck9wdGlvbnMuTWVtby5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pKSB7XG4gICAgICAgICAgICAgICAgbGV0IGluc3RydWN0aW9uVHJhbnNmZXI7XG5cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk1pbnQ6IHtcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWludC5pbnRvVXNlclNpZGUoaW5zdHJ1Y3Rpb24sIHR4TWV0YSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuVHJhbnNmZXI6XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBtb2R1bGVOYW1lID09PSBpbnN0cnVjdGlvbi5wcm9ncmFtICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBpZiAoaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgPT09ICd0cmFuc2ZlckNoZWNrZWQnKSB7XG4gICAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLlRyYW5zZmVyQ2hlY2tlZC5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLlRyYW5zZmVyLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIHJldHVybiBoaXN0b3J5O1xuICAgIH07XG59XG4iLCAiaW1wb3J0IHsgUGFyc2VkQWNjb3VudERhdGEgfSBmcm9tICdAc29sYW5hL3dlYjMuanMnO1xuaW1wb3J0IHsgUmVzdWx0LCBUcnkgfSBmcm9tICd+L3NoYXJlZCc7XG5pbXBvcnQgeyBOb2RlIH0gZnJvbSAnfi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uXG4gICAgICBjb25zdCBzb3VyY2VUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5yZXRyeUdldE9yQ3JlYXRlKFxuICAgICAgICB0b2tlbi50b1N0cmluZygpLFxuICAgICAgICBvd25lcixcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBzb3VyY2VUb2tlbjogJywgc291cmNlVG9rZW4pO1xuXG4gICAgICBjb25zdCBkZXN0VG9rZW4gPSBhd2FpdCBBY2NvdW50LkFzc29jaWF0ZWQucmV0cnlHZXRPckNyZWF0ZShcbiAgICAgICAgdG9rZW4udG9TdHJpbmcoKSxcbiAgICAgICAgd3JhcHBlZC50b1N0cmluZygpLFxuICAgICAgICBwYXllcixcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGRlc3RUb2tlbjogJywgZGVzdFRva2VuKTtcblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZVRyYW5zZmVySW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgc291cmNlVG9rZW4udG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBkZXN0VG9rZW4udG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHBhcnNlSW50KGAke2Ftb3VudH1gLCBSQURJWCksIC8vIE5vIGxhbXBvcnRzLCBpdHMgc29sXG4gICAgICAgICAga2V5cGFpcnMsXG4gICAgICAgICksXG4gICAgICApO1xuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlQ2xvc2VBY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgd3JhcHBlZCxcbiAgICAgICAgICBkZXN0LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBrZXlwYWlycyxcbiAgICAgICAgKSx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N0aW9uIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJTeXN0ZW1Qcm9ncmFtIiwgIlNvbE5hdGl2ZSIsICJTeXN0ZW1Qcm9ncmFtIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJTb2xOYXRpdmUiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiU29sTmF0aXZlIl0KfQo= \ No newline at end of file diff --git a/packages/suite-sol-native/src/gas-less-transfer.ts b/packages/suite-sol-native/src/gas-less-transfer.ts index 56695abf6..a1eb5a296 100644 --- a/packages/suite-sol-native/src/gas-less-transfer.ts +++ b/packages/suite-sol-native/src/gas-less-transfer.ts @@ -8,29 +8,27 @@ import { PartialSignStructure } from '~/types/transaction-builder'; export namespace SolNative { const RADIX = 10; export const gasLessTransfer = async ( - owner: Pubkey, + owner: Secret, dest: Pubkey, - signers: Secret[], amount: number, feePayer: Pubkey, ): Promise> => { return Try(async () => { const blockHashObj = await Node.getConnection().getLatestBlockhash(); + const ownerPublicKey = owner.toKeypair().publicKey; const tx = new Transaction({ blockhash: blockHashObj.blockhash, lastValidBlockHeight: blockHashObj.lastValidBlockHeight, feePayer: feePayer.toPublicKey(), }).add( SystemProgram.transfer({ - fromPubkey: owner.toPublicKey(), + fromPubkey: ownerPublicKey, toPubkey: dest.toPublicKey(), lamports: parseInt(`${amount.toLamports()}`, RADIX), }), ); - signers.forEach((signer) => { - tx.partialSign(signer.toKeypair()); - }); + tx.partialSign(owner.toKeypair()); const serializedTx = tx.serialize({ requireAllSignatures: false, diff --git a/packages/suite-sol-native/src/transfer-with-multisig.ts b/packages/suite-sol-native/src/transfer-with-multisig.ts index 13b5742b8..818ea4329 100644 --- a/packages/suite-sol-native/src/transfer-with-multisig.ts +++ b/packages/suite-sol-native/src/transfer-with-multisig.ts @@ -21,14 +21,14 @@ export namespace SolNative { export const transferWithMultisig = async ( owner: Pubkey, dest: Pubkey, - signers: Secret[], + ownerOrMultisig: Secret[], amount: number, options: Partial = {}, ): Promise> => { return Try(async () => { const connection = Node.getConnection(); - const payer = options.feePayer ? options.feePayer : signers[0]; - const keypairs = signers.map((s) => s.toKeypair()); + const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); const wrapped = await createWrappedNativeAccount( connection, payer.toKeypair(), @@ -85,7 +85,7 @@ export namespace SolNative { return new TransactionBuilder.Common( instructions, - signers.map((s) => s.toKeypair()), + ownerOrMultisig.map((s) => s.toKeypair()), payer.toKeypair(), ); }); diff --git a/packages/suite-sol-native/src/transfer.ts b/packages/suite-sol-native/src/transfer.ts index 00cd904ac..32b1e0797 100644 --- a/packages/suite-sol-native/src/transfer.ts +++ b/packages/suite-sol-native/src/transfer.ts @@ -10,7 +10,7 @@ export namespace SolNative { export const transfer = ( source: Pubkey, dest: Pubkey, - signers: Secret[], + ownerOrMultisig: Secret[], amount: number, options: Partial = {}, ): Result => { @@ -23,11 +23,11 @@ export namespace SolNative { const payer = options.feePayer ? options.feePayer.toKeypair() - : signers[0].toKeypair(); + : ownerOrMultisig[0].toKeypair(); return new TransactionBuilder.Common( [inst], - signers.map((s) => s.toKeypair()), + ownerOrMultisig.map((s) => s.toKeypair()), payer, ); }); diff --git a/packages/suite-sol-native/test/gas-less-transfer.test.ts b/packages/suite-sol-native/test/gas-less-transfer.test.ts index 0b5d2fdac..fa540897c 100644 --- a/packages/suite-sol-native/test/gas-less-transfer.test.ts +++ b/packages/suite-sol-native/test/gas-less-transfer.test.ts @@ -19,9 +19,8 @@ test.before(async () => { test('transfer feePayerPartialSign', async (t) => { const solAmount = 0.01; const serialized = await SolNative.gasLessTransfer( - source.pubkey, + source.secret, dest.pubkey, - [source.secret], solAmount, feePayer.pubkey, ); diff --git a/packages/suite-spl-token/dist/index.d.mts b/packages/suite-spl-token/dist/index.d.mts index bfb8892ab..770033189 100644 --- a/packages/suite-spl-token/dist/index.d.mts +++ b/packages/suite-spl-token/dist/index.d.mts @@ -766,12 +766,12 @@ type ThawOptions = { }; declare const SplToken: { - transfer: (mint: Pubkey, owner: Pubkey, dest: Pubkey, signers: Secret[], amount: number, mintDecimal: number, options?: Partial) => Promise>; + transfer: (mint: Pubkey, owner: Pubkey, dest: Pubkey, ownerOrMultisig: Secret[], amount: number, mintDecimal: number, options?: Partial) => Promise>; thaw: (mint: Pubkey, owner: Pubkey, freezeAuthority: Secret, options?: Partial) => Result; createFreezeAuthority: (mint: _solana_web3_js.PublicKey, owner: _solana_web3_js.PublicKey, freezeAuthority: _solana_web3_js.PublicKey) => _solana_web3_js.TransactionInstruction; createMint: (mint: _solana_web3_js.PublicKey, owner: _solana_web3_js.PublicKey, totalAmount: number, mintDecimal: number, tokenMetadata: _metaplex_foundation_mpl_token_metadata.DataV2, feePayer: _solana_web3_js.PublicKey, isMutable: boolean) => Promise<_solana_web3_js.TransactionInstruction[]>; - mint: (owner: Pubkey, signer: Secret, totalAmount: number, mintDecimal: number, input: InputTokenMetadata, options?: Partial) => Promise>; - gasLessTransfer: (mint: Pubkey, owner: Pubkey, dest: Pubkey, signers: Secret[], amount: number, mintDecimal: number, feePayer: Pubkey) => Promise>; + mint: (owner: Secret, totalAmount: number, mintDecimal: number, input: InputTokenMetadata, options?: Partial) => Promise>; + gasLessTransfer: (mint: Pubkey, owner: Secret, dest: Pubkey, amount: number, mintDecimal: number, feePayer: Pubkey) => Promise>; freeze: (mint: Pubkey, owner: Pubkey, freezeAuthority: Secret, options?: Partial) => Result; genericFindByOwner: (owner: Pubkey, callback: (result: Result) => void, tokenStandard: _metaplex_foundation_mpl_token_metadata.TokenStandard, sortable?: SortDirection | undefined, isHolder?: boolean | undefined) => Promise; genericFindByMint: (mint: Pubkey, tokenStandard: _metaplex_foundation_mpl_token_metadata.TokenStandard) => Promise>; @@ -780,8 +780,8 @@ declare const SplToken: { isHolder?: boolean | undefined; } | undefined) => void; findByMint: (mint: Pubkey) => Promise>; - burn: (mint: Pubkey, owner: Pubkey, signers: Secret[], burnAmount: number, tokenDecimals: number, options?: Partial) => Result; - add: (token: Pubkey, owner: Pubkey, signers: Secret[], totalAmount: number, mintDecimal: number, options?: Partial) => Promise, Error>>; + burn: (mint: Pubkey, owner: Pubkey, ownerOrMultisig: Secret[], burnAmount: number, tokenDecimals: number, options?: Partial) => Result; + add: (token: Pubkey, owner: Pubkey, ownerOrMultisig: Secret[], totalAmount: number, mintDecimal: number, options?: Partial) => Promise, Error>>; }; export { Account, Explorer, ExplorerOptions, FilterOptions, FilterType, KeypairAccount, Memo, MintTo, MintToChecked, ModuleName, Node, OwnerInfo, PostTokenAccount, Pubkey, Secret, SplToken, Transfer, TransferChecked, Try, Validator, ValidatorError, WithMemo, bufferToArray, convertTimestampToDateTime, debugLog, isBrowser, isNode, isPromise, overwriteObject, sleep, unixTimestamp }; diff --git a/packages/suite-spl-token/dist/index.d.ts b/packages/suite-spl-token/dist/index.d.ts index bfb8892ab..770033189 100644 --- a/packages/suite-spl-token/dist/index.d.ts +++ b/packages/suite-spl-token/dist/index.d.ts @@ -766,12 +766,12 @@ type ThawOptions = { }; declare const SplToken: { - transfer: (mint: Pubkey, owner: Pubkey, dest: Pubkey, signers: Secret[], amount: number, mintDecimal: number, options?: Partial) => Promise>; + transfer: (mint: Pubkey, owner: Pubkey, dest: Pubkey, ownerOrMultisig: Secret[], amount: number, mintDecimal: number, options?: Partial) => Promise>; thaw: (mint: Pubkey, owner: Pubkey, freezeAuthority: Secret, options?: Partial) => Result; createFreezeAuthority: (mint: _solana_web3_js.PublicKey, owner: _solana_web3_js.PublicKey, freezeAuthority: _solana_web3_js.PublicKey) => _solana_web3_js.TransactionInstruction; createMint: (mint: _solana_web3_js.PublicKey, owner: _solana_web3_js.PublicKey, totalAmount: number, mintDecimal: number, tokenMetadata: _metaplex_foundation_mpl_token_metadata.DataV2, feePayer: _solana_web3_js.PublicKey, isMutable: boolean) => Promise<_solana_web3_js.TransactionInstruction[]>; - mint: (owner: Pubkey, signer: Secret, totalAmount: number, mintDecimal: number, input: InputTokenMetadata, options?: Partial) => Promise>; - gasLessTransfer: (mint: Pubkey, owner: Pubkey, dest: Pubkey, signers: Secret[], amount: number, mintDecimal: number, feePayer: Pubkey) => Promise>; + mint: (owner: Secret, totalAmount: number, mintDecimal: number, input: InputTokenMetadata, options?: Partial) => Promise>; + gasLessTransfer: (mint: Pubkey, owner: Secret, dest: Pubkey, amount: number, mintDecimal: number, feePayer: Pubkey) => Promise>; freeze: (mint: Pubkey, owner: Pubkey, freezeAuthority: Secret, options?: Partial) => Result; genericFindByOwner: (owner: Pubkey, callback: (result: Result) => void, tokenStandard: _metaplex_foundation_mpl_token_metadata.TokenStandard, sortable?: SortDirection | undefined, isHolder?: boolean | undefined) => Promise; genericFindByMint: (mint: Pubkey, tokenStandard: _metaplex_foundation_mpl_token_metadata.TokenStandard) => Promise>; @@ -780,8 +780,8 @@ declare const SplToken: { isHolder?: boolean | undefined; } | undefined) => void; findByMint: (mint: Pubkey) => Promise>; - burn: (mint: Pubkey, owner: Pubkey, signers: Secret[], burnAmount: number, tokenDecimals: number, options?: Partial) => Result; - add: (token: Pubkey, owner: Pubkey, signers: Secret[], totalAmount: number, mintDecimal: number, options?: Partial) => Promise, Error>>; + burn: (mint: Pubkey, owner: Pubkey, ownerOrMultisig: Secret[], burnAmount: number, tokenDecimals: number, options?: Partial) => Result; + add: (token: Pubkey, owner: Pubkey, ownerOrMultisig: Secret[], totalAmount: number, mintDecimal: number, options?: Partial) => Promise, Error>>; }; export { Account, Explorer, ExplorerOptions, FilterOptions, FilterType, KeypairAccount, Memo, MintTo, MintToChecked, ModuleName, Node, OwnerInfo, PostTokenAccount, Pubkey, Secret, SplToken, Transfer, TransferChecked, Try, Validator, ValidatorError, WithMemo, bufferToArray, convertTimestampToDateTime, debugLog, isBrowser, isNode, isPromise, overwriteObject, sleep, unixTimestamp }; diff --git a/packages/suite-spl-token/dist/index.js b/packages/suite-spl-token/dist/index.js index a87b01428..562fcda59 100644 --- a/packages/suite-spl-token/dist/index.js +++ b/packages/suite-spl-token/dist/index.js @@ -1630,10 +1630,10 @@ var SplToken; // src/add.ts var SplToken2; ((SplToken11) => { - SplToken11.add = async (token, owner, signers, totalAmount, mintDecimal, options = {}) => { + SplToken11.add = async (token, owner, ownerOrMultisig, totalAmount, mintDecimal, options = {}) => { return Try(async () => { - const payer = options.feePayer ? options.feePayer : signers[0]; - const keypairs = signers.map((s) => s.toKeypair()); + const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); const tokenAssociated = await Account4.Associated.retryGetOrCreate( token, owner, @@ -1661,14 +1661,14 @@ var SplToken2; var import_spl_token3 = require("@solana/spl-token"); var SplToken3; ((SplToken11) => { - SplToken11.burn = (mint, owner, signers, burnAmount, tokenDecimals, options = {}) => { + SplToken11.burn = (mint, owner, ownerOrMultisig, burnAmount, tokenDecimals, options = {}) => { return Try(() => { const tokenAccount = (0, import_spl_token3.getAssociatedTokenAddressSync)( mint.toPublicKey(), owner.toPublicKey() ); - const payer = options.feePayer ? options.feePayer : signers[0]; - const keypairs = signers.map((s) => s.toKeypair()); + const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); const inst = (0, import_spl_token3.createBurnCheckedInstruction)( tokenAccount, mint.toPublicKey(), @@ -1855,12 +1855,12 @@ var import_spl_token6 = require("@solana/spl-token"); var import_web310 = require("@solana/web3.js"); var SplToken6; ((SplToken11) => { - SplToken11.gasLessTransfer = async (mint, owner, dest, signers, amount, mintDecimal, feePayer) => { + SplToken11.gasLessTransfer = async (mint, owner, dest, amount, mintDecimal, feePayer) => { return Try(async () => { - const keypairs = signers.map((s) => s.toKeypair()); + const ownerPublicKey = owner.toKeypair().publicKey; const sourceToken = await Account4.Associated.makeOrCreateInstruction( mint, - owner, + ownerPublicKey.toString(), feePayer ); const destToken = await Account4.Associated.makeOrCreateInstruction( @@ -1880,10 +1880,10 @@ var SplToken6; sourceToken.tokenAccount.toPublicKey(), mint.toPublicKey(), destToken.tokenAccount.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, SplToken.calculateAmount(amount, mintDecimal), mintDecimal, - keypairs + [owner.toKeypair()] ); tx.add(inst2); } else { @@ -1891,17 +1891,15 @@ var SplToken6; sourceToken.tokenAccount.toPublicKey(), mint.toPublicKey(), destToken.tokenAccount.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, SplToken.calculateAmount(amount, mintDecimal), mintDecimal, - keypairs + [owner.toKeypair()] ); tx.add(destToken.inst).add(inst2); } tx.recentBlockhash = blockhashObj.blockhash; - keypairs.forEach((signer) => { - tx.partialSign(signer); - }); + tx.partialSign(owner.toKeypair()); const serializedTx = tx.serialize({ requireAllSignatures: false }); @@ -2209,7 +2207,7 @@ var SplToken7; ); return instructions; }; - SplToken11.mint = async (owner, signer, totalAmount, mintDecimal, input, options = {}) => { + SplToken11.mint = async (owner, totalAmount, mintDecimal, input, options = {}) => { return Try(async () => { const valid = Validator.checkAll(input); if (valid.isErr) { @@ -2217,9 +2215,10 @@ var SplToken7; } const { feePayer, freezeAuthority } = options; const storageType = input.storageType || DEFAULT_STORAGE_TYPE; - const payer = feePayer ? feePayer : signer; + const payer = feePayer ? feePayer : owner; input.royalty = 0; const sellerFeeBasisPoints = 0; + const ownerPublicKey = owner.toKeypair().publicKey; const storageMetadata = Storage.toConvertOffchaindata( input, input.royalty @@ -2262,7 +2261,7 @@ var SplToken7; const mint2 = Account4.Keypair.create(); const insts = await (0, SplToken11.createMint)( mint2.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, totalAmount, mintDecimal, datav2, @@ -2273,14 +2272,14 @@ var SplToken7; insts.push( (0, SplToken11.createFreezeAuthority)( mint2.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, freezeAuthority.toPublicKey() ) ); } return new TransactionBuilder6.Mint( insts, - [signer.toKeypair(), mint2.toKeypair()], + [owner.toKeypair(), mint2.toKeypair()], payer.toKeypair(), mint2.pubkey ); @@ -2317,10 +2316,10 @@ var SplToken8; var import_spl_token9 = require("@solana/spl-token"); var SplToken9; ((SplToken11) => { - SplToken11.transfer = async (mint, owner, dest, signers, amount, mintDecimal, options = {}) => { + SplToken11.transfer = async (mint, owner, dest, ownerOrMultisig, amount, mintDecimal, options = {}) => { return Try(async () => { - const payer = options.feePayer ? options.feePayer : signers[0]; - const keypairs = signers.map((s) => s.toKeypair()); + const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); const sourceToken = await Account4.Associated.retryGetOrCreate( mint, owner, @@ -2378,4 +2377,4 @@ var SplToken10 = { sleep, unixTimestamp }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9hZGQudHMiLCAiLi4vLi4vc2hhcmVkL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvc2hhcmVkLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NhbGN1bGF0ZS10eHNpemUudHMiLCAiLi4vLi4vdHlwZXMvc3JjL2dsb2JhbC9pbmRleC50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2Fzc29jaWF0ZWQudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMva2V5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HVybiBUcnkoYXN5bmMgKCkgPT4ge1xuICAgICAgY29uc3QgcGF5ZXIgPSBvcHRpb25zLmZlZVBheWVyID8gb3B0aW9ucy5mZWVQYXllciA6IHNpZ25lcnNbMF07XG4gICAgICBjb25zdCBrZXlwYWlycyA9IHNpZ25lcnMubWFwKChzKSA9PiBzLnRvS2V5cGFpcigpKTtcblxuICAgICAgY29uc3QgdG9rZW5Bc3NvY2lhdGVkID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIHRva2VuLFxuICAgICAgICBvd25lcixcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpbnN0ID0gY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICB0b2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgQ2FsY3VsYXRlLmNhbGN1bGF0ZUFtb3VudCh0b3RhbEFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAga2V5cGFpcnMsXG4gICAgICApO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb248UHVia2V5PihcbiAgICAgICAgW2luc3RdLFxuICAgICAgICBrZXlwYWlycyxcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIHRva2VuLFxuICAgICAgKTtcbiAgICB9KTtcbiAgfTtcbn1cbiIsICJpbXBvcnQgeyBDb21taXRtZW50LCBQdWJsaWNLZXkgfSBmcm9tICdAc29sYW5hL3dlYjMuanMnO1xuaW1wb3J0IFNvbGFuYUpzb25Db25maWcgZnJvbSAnQHNvbGFuYS1zdWl0ZS9jb25maWcvbG9hZCc7XG5cbmxldCBD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S5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gYXJyLmZpbHRlcigoYSkgPT4gYS5mZWVQYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXIucHVibGljS2V5O1xuICAgICAgICAgIGZpbmFsU2lnbmVycyA9IFtmZWVQYXllciwgLi4uc2lnbmVyc107XG4gICAgICAgIH1cbiAgICAgICAgaW5zdHJ1Y3Rpb25zLm1hcCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICAvLyBDYWxjdWxhdGVUeHNpemUuaXNNYXhUcmFuc2FjdGlvblNpemUodHJhbnNhY3Rpb24sIGZlZVBheWVyLnB1YmxpY0tleSk7XG5cbiAgICAgICAgY29uc3Qgb3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogTUFYX1JFVFJJRVMsXG4gICAgICAgIH07XG5cbiAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgIG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gICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IG9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IE1BWF9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICBvcHRpb25zLFxuICAgICAgICApO1xuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEFueU9iamVjdCB9IGZyb20gJ34vdHlwZXMvc2hhcmVkJztcbmltcG9ydCB7IENvbnN0YW50cyB9IGZyb20gJy4vY29uc3RhbnRzJztcbmltcG9ydCB7IFJlc3VsdCB9IGZyb20gJy4vcmVzdWx0JztcblxuLyoqXG4gKiBjb252ZXJ0IGJ1ZmZlciB0byBBcnJheVxuICpcbiAqIEBwYXJhbSB7QnVmZmVyfSBidWZmZXJcbiAqIEByZXR1cm5zIG51bWJlcltdXG4gKi9cbmV4cG9ydCBjb25zdCBidWZmZXJUb0FycmF5ID0gKGJ1ZmZlcjogQnVmZmVyKTogbnVtYmVyW10gPT4ge1xuICBjb25zdCBudW1zID0gW107XG4gIGZvciAoY29uc3QgYnl0ZSBvZiBidWZmZXIpIH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AgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVlUGF5ZXJ9YCk7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoUkVUUllfU0xFRVBfVElNRSk7XG4gICAgICAgIGNvdW50ZXIrKztcbiAgICAgIH1cbiAgICAgIHRocm93IEVycm9yKGByZXRyeSBhY3Rpb24gaXMgb3ZlciBsaW1pdCAke1JFVFJZX09WRVJfTElNSVR9YCk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFtNYWluIGxvZ2ljXUdldCBBc3NvY2lhdGVkIHRva2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7X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ldCBpID0gMTtcbiAgICBmb3IgYXdhaXQgKGNvbnN0IG9iaiBvZiB0aGlzKSB7XG4gICAgICBpZiAob2JqLmlzRXJyKSB7XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgICB9IGVsc2UgaWYgKG9iai52YWx1ZS5jYW5TdWJtaXQpIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIGNhblN1Ym1pdCcpO1xuICAgICAgICBjb25zdCBzaWcgPSBhd2FpdCAob2JqIGFzIFBhcnRpYWxTaWduU3RydWN0dXJlKS5zdWJtaXQoZmVlUGF5ZXIpO1xuICAgICAgICBpZiAoc2lnLmlzRXJyKSB7XG4gICAgICAgICAgcmV0dXJuIHNpZztcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhzaWcudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIG90aGVyIHRoYW4gY2FuU3VibWl0Jyk7XG4gICAgICAgIGlmICh0aGlzLmxlbmd0aCA9PSBpKSB7XG4gICAgICAgICAgLy8gbGFzdCBvYmplY3RcbiAgICAgICAgICByZXR1cm4gb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICAgIH1cbiAgICAgICAgb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICB9XG4gICAgICBpKys7XG4gICAgfVxuICB9IGVsc2Uge1xuICAgIGNvbnN0IGluc3RydWN0aW9uczogQ29tbW9uU3RydWN0dXJlIHwgTWludFN0cnVjdHVyZVtdID0gW107XG4gICAgZm9yIChjb25zdCBvYmogb2YgdGhpcykge1xuICAgICAgaWYgKG9iai5pc0Vycikge1xuICAgICAgICByZXR1cm4gb2JqO1xuICAgICAgfSBlbHNlIGlmIChvYmouaXNPaykge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChvYmoudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgcm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9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW9uIGUuZzogZXJyPFZhbGlkYXRvckVycm9yPi5kZXRhaWxzJztcbiAgICAgICAgdGhyb3cgbmV3IFZhbGlkYXRvckVycm9yKG1lc3NhZ2UsIHJlc3VsdHMpO1xuICAgICAgfVxuICAgICAgcmV0dXJuIE1lc3NhZ2UuU1VDQ0VTUztcbiAgICB9KTtcbiAgfTtcblxuICB0eXBlIFBpY2tOZnRTdG9yYWdlID0gUGljazxcbiAgICBP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HJvZ3JhbUlkOiBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICB9LFxuICAgICAgKTtcblxuICAgICAgaW5mby52YWx1ZS5sZW5ndGggPT09IDAgJiYgY2FsbGJhY2soUmVzdWx0Lm9rKFtdKSk7XG5cbiAgICAgIGZvciBhd2FpdCAoY29uc3QgZCBvZiBpbmZvLnZhbHVlKSB7XG4gICAgICAgIGlmIChpc0hvbGRlciAmJiBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby50b2tlbkFtb3VudC51aUFtb3VudCA8IDEpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhcbiAgICAgICAgICAgICcjIGZpbmRCeU93bmVyIG5vIGhvbGQgbWV0YWRhdGE6ICcsXG4gICAgICAgICAgICBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mbyxcbiAgICAgICAgICApO1xuICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IG1pbnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby5taW50IGFzIFB1YmtleTtcbiAgICAgICAgY29uc3QgdG9rZW5BbW91bnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby50b2tlbkFtb3VudFxuICAgICAgICAgIC5hbW91bnQgYXMgc3RyaW5nO1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgY29uc3QgbWV0YWRhdGEgPSBhd2FpdCBNZXRhZGF0YS5mcm9tQWNjb3VudEFkZHJlc3MoXG4gICAgICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICAgICAgQWNjb3VudC5QZGEuZ2V0TWV0YWRhdGEobWludCksXG4gICAgICAgICAgKTtcbiAgICAgICAgICBkZWJ1Z0xvZygnIyBmaW5kQnlPd25lciBtZXRhZGF0YTogJywgbWV0YWRhdGEpO1xuICAgICAgICAgIC8vIHRva2VuU3RhbmRhcmQ6IDAoTkZUKSBvciAyIChTUEwtVE9LRU4pXG4gICAgICAgICAgaWYgKG1ldGFkYXRhLnRva2VuU3RhbmRhcmQgIT09IHRva2VuU3RhbmRhcmQpIHtcbiAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgIH1cbiAgICAgICAgICBmZXRjaChtZXRhZGF0YS5kYXRhLnVyaSlcbiAgICAgICAgICAgIC50aGVuKChyZXNwb25zZSkgPT4ge1xuICAgICAgICAgICAgICByZXNwb25zZVxuICAgICAgICAgICAgICAgIC5qc29uKClcbiAgICAgICAgICAgICAgICAudGhlbigoanNvbjogT2ZmY2hhaW4pID0+IHtcbiAgICAgICAgICAgICAgICAgIGRhdGEucHVzaChcbiAgICAgICAgICAgICAgICAgICAgY29udmVydGVyPFQ+KHRva2VuU3RhbmRhcmQsIG1ldGFkYXRhLCBqc29uLCB0b2tlbkFtb3VudCksXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgY2FsbGJhY2soUmVzdWx0Lm9rKGRhdGEpKTsgLy8gbmVlZCB0aGlzIGNhbGwgP1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgLmNhdGNoKChlKSA9PiB7XG4gICAgICAgICAgICAgICAgICBjYWxsYmFjayhSZXN1bHQuZXJyKGUpKTtcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIC5maW5hbGx5KCgpID0+IHtcbiAgICAgICAgICAgICAgICAgIGNvbnN0IGRlc2NBbGdvID0gc29ydEJ5VWluaXhUaW1lc3RhbXA8VD4oU29ydERpcmVjdGlvbi5EZXNjKTtcbiAgICAgICAgICAgICAgICAgIGNvbnN0IGFzY0FsZ28gPSBzb3J0QnlVaW5peFRpbWVzdGFtcDxUPihTb3J0RGlyZWN0aW9uLkFzYyk7XG4gICAgICAgICAgICAgICAgICBpZiAoc29ydGFibGUgPT09IFNvcnREaXJlY3Rpb24uRGVzYykge1xuICAgICAgICAgICAgICAgICAgICBkYXRhID0gZGF0YS5zb3J0KGRlc2NBbGdvKTtcbiAgICAgICAgICAgICAgICA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2toYXNoLFxuICAgICAgICBmZWVQYXllcjogZmVlUGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgIH0pO1xuXG4gICAgICAvLyByZXR1cm4gYXNzb2NpYXRlZCB0b2tlbiBhY2NvdW50XG4gICAgICBpZiAoIWRlc3RUb2tlbi5pbnN0KSB7XG4gICAgICAgIGluc3QyID0gY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgc291cmNlVG9rZW4udG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGRlc3RUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIENhbGN1bGF0b3IuY2FsY3VsYXRlQW1vdW50KGFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICAgIGtleXBhaXJzLFxuICAgICAgICApO1xuICAgICAgICB0eC5hZGQoaW5zdDIpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgLy8gcmV0dXJuIGluc3RydWN0aW9uIGFuZCB1bmRlY2lkZWQgYXNzb2NpYXRlZCB0b2tlbiBhY2NvdW50XG4gICAgICAgIGluc3QyID0gY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgc291cmNlVG9rZW4udG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGRlc3RUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIENhbGN1bGF0b3IuY2FsY3VsYXRlQW1vdW50KGFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICAgI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ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWV0YWRhdGFBY2NvdW50VjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIG1ldGFkYXRhOiBtZXRhZGF0YVBkYSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWV0YWRhdGFBY2NvdW50QXJnc1YzOiB7XG4gICAgICAgICAgICBkYXRhOiB0b2tlbk1ldGFkYXRhLFxuICAgICAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgICAgICAgY29sbGVjdGlvbkRldGFpbHM6IG51bGwsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcbiAgICByZXR1cm4gaW5zdHJ1Y3Rpb25zO1xuICB9O1xuXG4gIC8qKlxuICAgKiBTUEwtVE9LRU4gbWludFxuICAgKlxuICAgKiBAcGFyYW0ge1B1YmtleX0gb3duZXIgICAgICAgLy8gdG9rZW4gb3duZXJcbiAgICogQHBhcmFtIHtTZWNyZXR9IHNpZ25lciAgICAgIC8vIHRva2VuIG93bmVyIFNlY3JldFxuICAgKiBAcGFyYW0ge251bWJlcn0gdG90YWxBbW91bnQgLy8gdG90YWwgbnVtYmVyXG4gICAqIEBwYXJhbSB7bnVtYmVyfSBtaW50RGVjaW1hbCAvLyB0b2tlbiBkZWNpbWFsXG4gICAqIEBwYXJhbSB7SW5wdXRUb2tlbk1ldGFkYXRhfSBpbnB1dCAgICAgICAvLyB0b2tlbiBtZXRhZGF0YVxuICAgKiBAcGFyYW0ge1BhcnRpYWw8TWlud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cgRXJyb3IoYE11c3Qgc2V0IGZpbGVQYXRoJyBvciAndXJpJ2ApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBpc011dGFibGUgPSB0cnVlO1xuXG4gICAgICBjb25zdCBkYXRhdjIgPSBDb252ZXJ0ZXIuVG9rZW5NZXRhZGF0YS5pbnRvSW5mcmEoXG4gICAgICAgIGlucHV0LFxuICAgICAgICB1cmksXG4gICAgICAgIHNlbGxlckZlZUJhc2lzUG9pbnRzLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuICAgICAgZGVidWdMb2coJyMgdXBsb2FkIGNvbnRlbnQgdXJsOiAnLCB1cmkpO1xuXG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgaW5zdHMgPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIHRvdGFsQW1vdW50LFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZUZyZWV6ZUF1dGhvcml0eShcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3I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HQ8VHJhbnNhY3Rpb25TaWduYXR1cmUsIEVycm9yPj4gPT4ge1xuICAgICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICAgIGxldCBpID0gMDtcbiAgICAgICAgZm9yIChjb25zdCBhIG9mIGFycikge1xuICAgICAgICAgIGlmICghYS5pbnN0cnVjdGlvbnMgJiYgIWEuc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoYSl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGFyci5mbGF0TWFwKChhKSA9PiBhLmluc3RydWN0aW9ucyk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gYXJyLmZpbHRlcigoYSkgPT4gYS5mZWVQYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAg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leSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgICBhbGxvd093bmVyT2ZmQ3VydmUgPSBmYWxzZSxcbiAgICApOiBQcm9taXNlPHN0cmluZyB8IENvbW1vblN0cnVjdHVyZTxQdWJrZXk+PiA9PiB7XG4gICAgICBjb25zdCByZXMgPSBhd2FpdCBtYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG5ldyBLZXlwYWlyLktleXBhaXIoeyBzZWNyZXQ6IGZlZVBheWVyIH0pLnB1YmtleSxcbiAgICAgICAgYWxsb3dPd25lck9mZkN1cnZlLFxuICAgICAgKTtcblxuICAgICAgaWYgKCFyZXMuaW5zdCkge1xuICAgICAgICByZXR1cm4gcmVzLnRva2VuQWNjb3VudDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uPFB1YmtleT4oXG4gICAgICAgIFtyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sI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5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgYnMgZnJvbSAnYnM1OCc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgQWNjb3VudCB7XG4gIGV4cG9ydCBjbGFzcyBLZXlwYWlyIHtcbiAgICBzZWNyZXQ6IFNlY3JldDtcbiAgICBwdWJrZXk6IFB1YmtleTtcblxuICAgIGNvbnN0cnVjdG9yKHBhcmFtczogeyBwdWJrZXk/OiBQdWJrZXk7IHNlY3JldDogU2VjcmV0IH0pIHtcbiAgICAgIGlmICghcGFyYW1zLnB1YmtleSkge1xuICAgICAgICBjb25zdCBrZXlwYWlyID0gcGFyYW1zLnNlY3JldC50b0tleXBhaXIoKTtcbiAgICAgICAgdGhpcy5wdWJrZXkgPSBrZXlwYWlyLnB1YmxpY0tleS50b1N0cmluZygpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAg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SW1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgIC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291bnQuZGF0YS5wYXJzZWQuaW5mbyxcbiAgICAgICAgICApO1xuICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IG1pbnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby5taW50IGFzIFB1YmtleTtcbiAgICAgICAgY29uc3QgdG9rZW5BbW91bnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby50b2tlbkFtb3VudFxuICAgICAgICAgIC5hbW91bnQgYXMgc3RyaW5nO1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgY29uc3QgbWV0YWRhdGEgPSBhd2FpdCBNZXRhZGF0YS5mcm9tQWNjb3VudEFkZHJlc3MoXG4gICAgICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICAgICAgQWNjb3VudC5QZGEuZ2V0TWV0YWRhdGEobWludCksXG4gICAgICAgICAgKTtcbiAgICAgICAgICBkZWJ1Z0xvZygnIyBmaW5kQnlPd25lciBtZXRhZGF0YTogJywgbWV0YWRhdGEpO1xuICAgICAgICAgIC8vIHRva2VuU3RhbmRhcmQ6IDAoTkZUKSBvciAyIChTUEwtVE9LRU4pXG4gICAgICAgICAgaWYgKG1ldGFkYXRhLnRva2VuU3RhbmRhcmQgIT09IHRva2VuU3RhbmRhcmQpIHtcbiAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgIH1cbiAgICAgICAgICBmZXRjaChtZXRhZGF0YS5kYXRhLnVyaSlcbiAgICAgICAgICAgIC50aGVuKChyZXNwb25zZSkgPT4ge1xuICAgICAgICAgICAgICByZXNwb25zZVxuICAgICAgICAgICAgICAgIC5qc29uKClcbiAgICAgICAgICAgICAgICAudGhlbigoanNvbjogT2ZmY2hhaW4pID0+IHtcbiAgICAgICAgICAgICAgICAgIGRhdGEucHVzaChcbiAgICAgICAgICAgICAgICAgICAgY29udmVydGVyPFQ+KHRva2VuU3RhbmRhcmQsIG1ldGFkYXRhLCBqc29uLCB0b2tlbkFtb3VudCksXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgY2FsbGJhY2soUmVzdWx0Lm9rKGRhdGEpKTsgLy8gbmVlZCB0aGlzIGNhbGwgP1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgLmNhdGNoKChlKSA9PiB7XG4gICAgICAgICAgICAgICAgICBjYWxsYmFjayhSZXN1bHQuZXJyKGUpKTtcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIC5maW5hbGx5KCgpID0+IHtcbiAgICAgICAgICAgICAgICAgIGNvbnN0IGRlc2NBbGdvID0gc29ydEJ5VWluaXhUaW1lc3RhbXA8VD4oU29ydERpcmVjdGlvbi5EZXNjKTtcbiAgICAgICAgICAgICAgICAgIGNvbnN0IGFzY0FsZ28gPSBzb3J0QnlVaW5peFRpbWVzdGFtcDxUPihTb3J0RGlyZWN0aW9uLkFzYyk7XG4gICAgICAgICAgICAgICAgICBpZiAoc29ydGFibGUgPT09IFNvcnREaXJlY3Rpb24uRGVzYykge1xuICAgICAgICAgICAgICAgICAgICBkYXRhID0gZGF0YS5zb3J0KGRlc2NBbGdvKTtcbiAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoc29ydGFibGUgPT09IFNvcnREaXJlY3Rpb24uQXNjKSB7XG4gICAgICAgICAgICAgICAgICAgIGRhdGEgPSBkYXRhLnNvcnQoYXNjQWxnbyk7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICBjYWxsYmFjayhSZXN1bHQub2soZGF0YSkpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIC5jYXRjaCgoZSkgPT4ge1xuICAgICAgICAgICAgICBjYWxsYmFjayhSZXN1bHQuZXJyKGUpKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgaWYgKGUgaW5zdGFuY2VvZiBFc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1YmxpY0tleSxcbiAgICAgICAgICBDYWxjdWxhdG9yLmNhbGN1bGF0ZUFtb3VudChhbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgICBbb3duZXIudG9LZXlwYWlyKCldLFxuICAgICAgICApO1xuICAgICAgICB0eC5hZGQoaW5zdDIpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgLy8gcmV0dXJuIGluc3RydWN0aW9uIGFuZCB1bmRlY2lkZWQgYXNzb2NpYXRlZCB0b2tlbiBhY2NvdW50XG4gICAgICAgIGluc3QyID0gY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgc291cmNlVG9rZW4udG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGRlc3RUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICBDYWxjdWxhdG9yLmNhbGN1bGF0ZUFtb3VudChhbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgICBbb3duZXIudG9LZXlwYWlyKCldLFxuICAgICAgICApO1xuICAgICAgICB0eC5hZGQoZGVzdFRva2VuLmluc3QpLmFkZChpbnN0Mik7XG4gICAgICB9XG5cbiAgICAgIHR4LnJlY2VudEJsb2NraGFzaCA9IGJsb2NraGFzaE9iai5ibG9ja2hhc2g7XG4gICAgICB0eC5wYXJ0aWFsU2lnbihvd25lci50b0tleXBhaXIoKSk7XG5cbiAgICAgIGNvbnN0IHNlcmlhbGl6ZWRUeCA9IHR4LnNlcmlhbGl6ZSh7XG4gICAgICAgIHJlcXVpcmVBbGxTaWduYXR1cmVzOiBmYWxzZSxcbiAgICAgIH0pO1xuICAgICAgY29uc3QgaGV4ID0gc2Vy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WxpemVNaW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBvd25lcixcbiAgICAgICAgb3duZXIsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgZmVlUGF5ZXIsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG1pbnQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgQ2FsY3VsYXRlLmNhbGN1bGF0ZUFtb3VudCh0b3RhbEFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWV0YWRhdGFBY2NvdW50VjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIG1ldGFkYXRhOiBtZXRhZGF0YVBkYSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWV0YWRhdGFBY2NvdW50QXJnc1YzOiB7XG4gICAgICAgICAgICBkYXRhOiB0b2tlbk1ldGFk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V0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCBwYXllciA9IG9wdGlvbnMuZmVlUGF5ZXIgPyBvcHRpb25zLmZlZVBheWVyIDogb3duZXJPck11bHRpc2lnWzBdO1xuICAgICAgY29uc3Qga2V5cGFpcnMgPSBvd25lck9yTXVsdGlzaWcubWFwKChzKSA9PiBzLnRvS2V5cGFpcigpKTtcblxuICAgICAgY29uc3Qgc291cmNlVG9rZW4gPSBhd2FpdCBBY2NvdW50LkFzc29jaWF0ZWQucmV0cnlHZXRPckNyZWF0ZShcbiAgICAgICAgbWludCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIHBheWVyLFxuICAgICAgKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIG1pbnQsXG4gICAgICAgIGRlc3QsXG4gICAgICAgIHBheWVyLFxuICAgICAgKTtcblxuICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZVRyYW5zZmVyQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICBzb3VyY2VUb2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIGRlc3RUb2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBDYWxjdWxhdG9yLmNhbGN1bGF0ZUFtb3VudChhbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIGtleXBhaXJzLFxuICAgICAgKTtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKFtpbnN0XSwga2V5cGFpcnMsIHBheWVyLnRvS2V5cGFpcigpKTtcbiAgICB9KTtcbiAgfTtcbn1cbiJdLAogICJtYXBwaW5ncyI6ICI7Ozs7Oz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0X3dlYjMiLCAiU3BsVG9rZW4iLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X3dlYjMiLCAiaW1wb3J0X3NwbF90b2tlbiIsICJpbXBvcnRfbXBsX3Rva2VuX21ldGFkYXRhIiwgIlByb3ZlbmFuY2VMYXllciIsICJ1cGxvYWRGaWxlIiwgIklyeXMiLCAiQXJ3ZWF2ZSIsICJOZnRTdG9yYWdlIiwgIlN0b3JhZ2UiLCAiU3BsVG9rZW4iLCAibWludCIsICJBY2NvdW50IiwgIkNvbnZlcnRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X3NwbF90b2tlbiIsICJTcGxUb2tlbiIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfc3BsX3Rva2VuIiwgIlNwbFRva2VuIiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlNwbFRva2VuIl0KfQo= \ No newline at end of file diff --git a/packages/suite-spl-token/dist/index.mjs b/packages/suite-spl-token/dist/index.mjs index e896198db..bf24aa043 100644 --- a/packages/suite-spl-token/dist/index.mjs +++ b/packages/suite-spl-token/dist/index.mjs @@ -1598,10 +1598,10 @@ var SplToken; // src/add.ts var SplToken2; ((SplToken11) => { - SplToken11.add = async (token, owner, signers, totalAmount, mintDecimal, options = {}) => { + SplToken11.add = async (token, owner, ownerOrMultisig, totalAmount, mintDecimal, options = {}) => { return Try(async () => { - const payer = options.feePayer ? options.feePayer : signers[0]; - const keypairs = signers.map((s) => s.toKeypair()); + const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); const tokenAssociated = await Account4.Associated.retryGetOrCreate( token, owner, @@ -1632,14 +1632,14 @@ import { } from "@solana/spl-token"; var SplToken3; ((SplToken11) => { - SplToken11.burn = (mint, owner, signers, burnAmount, tokenDecimals, options = {}) => { + SplToken11.burn = (mint, owner, ownerOrMultisig, burnAmount, tokenDecimals, options = {}) => { return Try(() => { const tokenAccount = getAssociatedTokenAddressSync2( mint.toPublicKey(), owner.toPublicKey() ); - const payer = options.feePayer ? options.feePayer : signers[0]; - const keypairs = signers.map((s) => s.toKeypair()); + const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); const inst = createBurnCheckedInstruction( tokenAccount, mint.toPublicKey(), @@ -1832,12 +1832,12 @@ import { createTransferCheckedInstruction } from "@solana/spl-token"; import { Transaction as Transaction5 } from "@solana/web3.js"; var SplToken6; ((SplToken11) => { - SplToken11.gasLessTransfer = async (mint, owner, dest, signers, amount, mintDecimal, feePayer) => { + SplToken11.gasLessTransfer = async (mint, owner, dest, amount, mintDecimal, feePayer) => { return Try(async () => { - const keypairs = signers.map((s) => s.toKeypair()); + const ownerPublicKey = owner.toKeypair().publicKey; const sourceToken = await Account4.Associated.makeOrCreateInstruction( mint, - owner, + ownerPublicKey.toString(), feePayer ); const destToken = await Account4.Associated.makeOrCreateInstruction( @@ -1857,10 +1857,10 @@ var SplToken6; sourceToken.tokenAccount.toPublicKey(), mint.toPublicKey(), destToken.tokenAccount.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, SplToken.calculateAmount(amount, mintDecimal), mintDecimal, - keypairs + [owner.toKeypair()] ); tx.add(inst2); } else { @@ -1868,17 +1868,15 @@ var SplToken6; sourceToken.tokenAccount.toPublicKey(), mint.toPublicKey(), destToken.tokenAccount.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, SplToken.calculateAmount(amount, mintDecimal), mintDecimal, - keypairs + [owner.toKeypair()] ); tx.add(destToken.inst).add(inst2); } tx.recentBlockhash = blockhashObj.blockhash; - keypairs.forEach((signer) => { - tx.partialSign(signer); - }); + tx.partialSign(owner.toKeypair()); const serializedTx = tx.serialize({ requireAllSignatures: false }); @@ -2200,7 +2198,7 @@ var SplToken7; ); return instructions; }; - SplToken11.mint = async (owner, signer, totalAmount, mintDecimal, input, options = {}) => { + SplToken11.mint = async (owner, totalAmount, mintDecimal, input, options = {}) => { return Try(async () => { const valid = Validator.checkAll(input); if (valid.isErr) { @@ -2208,9 +2206,10 @@ var SplToken7; } const { feePayer, freezeAuthority } = options; const storageType = input.storageType || DEFAULT_STORAGE_TYPE; - const payer = feePayer ? feePayer : signer; + const payer = feePayer ? feePayer : owner; input.royalty = 0; const sellerFeeBasisPoints = 0; + const ownerPublicKey = owner.toKeypair().publicKey; const storageMetadata = Storage.toConvertOffchaindata( input, input.royalty @@ -2253,7 +2252,7 @@ var SplToken7; const mint2 = Account4.Keypair.create(); const insts = await (0, SplToken11.createMint)( mint2.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, totalAmount, mintDecimal, datav2, @@ -2264,14 +2263,14 @@ var SplToken7; insts.push( (0, SplToken11.createFreezeAuthority)( mint2.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, freezeAuthority.toPublicKey() ) ); } return new TransactionBuilder6.Mint( insts, - [signer.toKeypair(), mint2.toKeypair()], + [owner.toKeypair(), mint2.toKeypair()], payer.toKeypair(), mint2.pubkey ); @@ -2311,10 +2310,10 @@ var SplToken8; import { createTransferCheckedInstruction as createTransferCheckedInstruction2 } from "@solana/spl-token"; var SplToken9; ((SplToken11) => { - SplToken11.transfer = async (mint, owner, dest, signers, amount, mintDecimal, options = {}) => { + SplToken11.transfer = async (mint, owner, dest, ownerOrMultisig, amount, mintDecimal, options = {}) => { return Try(async () => { - const payer = options.feePayer ? options.feePayer : signers[0]; - const keypairs = signers.map((s) => s.toKeypair()); + const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); const sourceToken = await Account4.Associated.retryGetOrCreate( mint, owner, @@ -2371,4 +2370,4 @@ export { sleep, unixTimestamp }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc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NoQnVuZGxyID0gKGVudjogc3RyaW5nKTogc3RyaW5nID0+IHtcbiAgICBzd2l0Y2ggKGVudikge1xuICAgICAgY2FzZSBDb25zdGFudHMuQ2x1c3Rlci5wcmQ6IHtcbiAgICAgICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5CdW5kbHJVcmwucHJkLnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIHJldHVybiBDb25zdGFudHMuQnVuZGxyVXJsLmRldjtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IHN3aXRjaERhc0FwaSA9IChlbnY6IHN0cmluZyk6IHN0cmluZyA9PiB7XG4gICAgc3dpdGNoIChlbnYpIHtcbiAgICAgIGNhc2UgQ29uc3RhbnRzLkNsdXN0ZXIucHJkOiB7XG4gICAgICAgIGlmIChkYXNBcGlVcmwubGVuZ3RoIDwgMSkge1xuICAgICAgICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuREFTX0FQSV9VUkwpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuQnVuZGxyVXJsLnByZC5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBjb25zdCB1cmxzID0gQ29uc3RhbnRzLkRhc0FwaVVybC5kZXYuc3BsaXQoJywnKTtcbiAgICAgICAgY29uc3QgaW5kZXggPSBEYXRlLm5vdygpICUgdXJscy5sZW5ndGg7XG4gICAgICAgIHJldHVybiB1cmxzW2luZGV4XTtc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sIGl4KSA9PiB7XG4gICAgICBpeC5rZXlzLmZvckVhY2goKHsgcHVia2V5LCBpc1NpZ25lciB9KSA9PiB7XG4gICAgICAgIGNvbnN0IHBrID0gcHVia2V5LnRvQmFzZTU4KCk7XG4gICAgICAgIGlmIChpc1NpZ25lcikgc2lnbmVycy5hZGQocGspO1xuICAgICAgICBhY2NvdW50cy5hZGQocGspO1xuICAgICAgfSk7XG5cbiAgICAgIGFjY291bnRzLmFkZChpeC5wcm9ncmFtSWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IG5JbmRleGVzID0gaXgua2V5cy5sZW5ndGg7XG4gICAgICBjb25zdCBvcGFxdWVEYXRhID0gaXguZGF0YS5sZW5ndGg7XG5cbiAgICAgIHJldHVybiAoXG4gICAgICAgIGFjYyArXG4gICAgICAgIDEgKyAvLyBQSUQgaW5kZXhcbiAgICAgICAgY29tcGFjdEFycmF5U2l6ZShuSW5kZXhlcywgMSkgK1xuICAgICAgICBjb21wYWN0QXJyYXlTaXplKG9wYXF1ZURhdGEsIDEpXG4gICAgICApO1xuICAgIH0sIDApO1xuXG4gICAgcmV0dXJuIChcbiAgICAgIGNvbXBhY3RBcnJheVNpemUoc2lnbmVycy5zaXplLCA2NCkgKyAvLyBzaWduYXR1cmVzXG4gICAgICAzICsgLy8gaGVhZGVyXG4gICAgICBjb21wYWN0QXJyYXlTaXplKGFjY291bnRzLnNpemUsIDMyKSArIC8vIGFjY291bnRzXG4gICAgICAzMiArIC8vIGJsb2NraGFzaFxuICAgICAgY29tcGFjdEhlYWRlcih0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMubGVuZ3RoKSArIC8vIGluc3RydWN0aW9uc1xuICAgICAgaXhzU2l6ZVxuICAgICk7XG4gIH07XG5cbiAgLyoqXG4gICAqIElzIG1heCB0cmFuc2FjdGlvbiBzaXplXG4gICAqIEBwYXJhbSB0cmFuc2FjdGlvbiBhIHNvbGFuYSB0cmFuc2FjdGlvblxuICAgKiBAcGFy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gdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtTZWNyZXR9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IHJldHJ5R2V0T3JDcmVhdGUgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICApOiBQcm9taXNlPHN0cmluZz4gPT4ge1xuICAgICAgbGV0IGNvdW50ZXIgPSAxO1xuICAgICAgd2hpbGUgKGNvdW50ZXIgPCBSRVRSWV9PVkVSX0xJTUlUKSB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgY29uc3QgaW5zdCA9IGF3YWl0IGdldChtaW50LCBvd25lciwgZmVlUGF5ZXIsIHRydWUpO1xuXG4gICAgICAgICAgaWYgKGluc3QgJiYgdHlwZW9mIGluc3QgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBpbnN0KTtcbiAgICAgICAgICAgIHJldHVybiBpbnN0O1xuICAgICAgICAgIH0gZWxzZSBpZiAoaW5zdCBpbnN0YW5jZW9mIFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24pIHtcbiAgICAgICAgICAgIChhd2FpdCBpbnN0LnN1Ym1pdCgpKS5tYXAoXG4gICAgICAgICAgICAgIGFzeW5jIChvazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2coYCMgbWludDogJHttaW50fSwgb3duZXI6ICR7b3duZXJ9LCBmZWVQYXllcjogJHtmZWVQYXllcn1gKTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBzbGVlcChSRVRSWV9TTEVFUF9USU1FKTtcbiAgICAgICAgY291bnRlcisrO1xuICAgICAgfVxuICAgICAgdGhyb3cgRXJyb3IoYHJldHJ5IGFjdGlvbiBpcyBvdmVyIGxpbWl0ICR7UkVUUllfT1ZFUl9MSU1JVH1gKTtcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogW01haW4gbG9naWNdR2V0IEFzc29jaWF0ZWQgdG9rZW4gQWNjb3VudC5cbiAgICAgKiBpZiBub3QgY3JlYXRlZCwgY3JlYXRlIG5ldyB0b2tlbiBhY2NvdWludFxuICAgICAqXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG1pbnRcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gb3duZXJcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gZmVlUGF5ZXJcbiAgICAgKiBAcmV0dXJucyBQcm9taXNlPHN0cmluZz5cbiAgICAgKi9cbiAgICBleHBvcnQgY29uc3QgbWFrZU9yQ3JlYXRlSW5zdHJ1Y3Rpb24gPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVl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nJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCBicyBmcm9tICdiczU4JztcblxuZXhwb3J0IG5hbWVzcGFjZSBBY2N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VTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEJndW1TaWduZXIgPSAoKTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtCdWZmZXIuZnJvbSgnY29sbGVjdGlvbl9jcGknLCAndXRmOCcpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEFzc2V0SWQgPSAoYWRkcmVzczogUHVia2V5LCBsZWFmSW5kZXg6IG51bWJlcik6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCBub2RlID0gbmV3IEJOLkJOKGxlYWZJbmRleCk7XG4gICAgICBjb25zdCBbYXNzZXRJZF0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW1xuICAgICAgICAgIEJ1ZmZlci5mcm9tKCdhc3NldCcsICd1dGY4JyksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgVWludDhBcnJheS5mcm9tKG5vZGUudG9BcnJheSgnbGUnLCA4KSksXG4gICAgICAgIF0sXG4gICAgICAgIE1QTF9CVUJCTEVHVU1fUFJPR1JBTV9JRC50b1B1YmxpY0tleSgpLFxuICAgICAgKTtcbiAgICAgIHJldHVybiBhc3NldElkLnRvU3RyaW5nKCk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEFjY291bnQgYXMgQXNzb2NpYXRlZCB9IGZyb20gJy4vYXNzb2NpYXRlZCc7XG5pbX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bnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gb3V0cHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1N0cmluZygpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBkYXRhLnZlcmlmaWVkLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImV4cG9ydCBuYW1lc3BhY2UgQ29udmVydGVyIHtcbiAgZXhwb3J0IG5hbWVzcGFjZSBSb3lhbHR5IHtcbiAgICBleHBvcnQgY29uc3QgVEhSRVNIT0xEID0gMTAwO1xuICAgIGV4cG9ydCBjb25zdCBpbnRvSW5mcmEgPSAocGVyY2VudGFnZTogbnVtYmVyKSA9PiB7XG4gICAgICByZXR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AoKGtleSkgPT4ge1xuICAgICAgICBsZXQgcmVzITogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+O1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWU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IG9mIGluZm8udmFsdWUpIHtcbiAgICAgICAgaWYgKGlzSG9sZGVyICYmIGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLnRva2VuQW1vdW50LnVpQW1vdW50IDwgMSkge1xuICAgICAgICAgIGRlYnVnTG9nKFxuICAgICAgICAgICAgJyMgZmluZEJ5T3duZXIgbm8gaG9sZCBtZXRhZGF0YTogJyxcbiAgICAgICAgICAgIGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLFxuICAgICAgICAgICk7XG4gICAgICAgICAgY29udGludWU7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgbWludCA9IGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLm1pbnQgYXMgUHVia2V5O1xuICAgICAgICBjb25zdCB0b2tlbkFtb3VudCA9IGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLnRva2VuQW1vdW50XG4gICAgICAgICAgLmFtb3VudCBhcyBzdHJpbmc7XG5cbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICBjb25zdCBtZXRhZGF0YSA9IGF3YWl0IE1ldGFkYXRhLmZyb21BY2NvdW50QWRkcmVzcyhcbiAgICAgICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgICAgICBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShtaW50KSxcbiAgICAgICAgICApO1xuICAgICAgICAgIGRlYnVnTG9nKCcjIGZpbmRCeU93bmVyIG1ldGFkYXRhOiAnLCBtZXRhZGF0YSk7XG4gICAgICAgICAgLy8gdG9rZW5TdGFuZGFyZDogMChORlQpIG9yIDIgKFNQTC1UT0tFTilcbiAgICAgICAgICBpZiAobWV0YWRhdGEudG9rZW5TdGFuZGFyZCAhPT0gdG9rZW5TdGFuZGFyZCkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuICAgICAgICAgIGZldGNoKG1ldGFkYXRhLmRhdGEudXJpKVxuICAgICAgICAgICAgLnRoZW4oKHJlc3BvbnNlKSA9PiB7XG4gICAgICAgICAgICAgIHJlc3BvbnNlXG4gICAgICAgICAgICAgICAgLmpzb24oKVxuICAgICAgICAgICAgICAgIC50aGVuKChqc29uOiBPZmZjaGFpbikgPT4ge1xuICAgICAgICAgICAgICAgICAgZGF0YS5wdXNoKFxuICAgICAgICAgICAgICAgICAgICBjb252ZXJ0ZXI8VD4odG9rZW5TdGFuZGFyZCwgbWV0YWRhdGEsIGpzb24sIHRva2VuQW1vdW50KSxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICBjYWxsYmFjayhSZXN1bHQub2soZGF0YSkpOyAvLyBuZWVkIHRoaXMgY2FsbCA/XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAuY2F0Y2goKGUpID0+IHtcbiAgICAgICAgICAgICAgICAgIGNhbGxiYWNrKFJlc3VsdC5lcnIoZSkpO1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgLmZpbmFsbHkoKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgY29uc3QgZGVzY0FsZ28gPSBzb3J0QnlVaW5peFRpbWVzdGFtcDxUPihTb3J0RGlyZWN0aW9uLkRlc2MpO1xuICAgICAgICAgICAgICAgICAgY29uc3QgYXNjQWxnbyA9IHNvcnRCeVVpbml4VGltZXN0YW1wPFQ+KFNvcnREaXJlY3Rpb24uQXNjKTtcbiAgICAgICAgICAgICAgICAgIGlmIChzb3J0YWJsZSA9PT0gU29ydERpcmVjdGlvbi5EZXNjKSB7XG4gICAgICAgICAgICAgICAgICAgIGRhdGEgPSBkYXRhLnNvcnQoZGVzY0FsZ28pO1xuICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChzb3J0YWJsZSA9PT0gU29ydERpcmVjdGlvbi5Bc2MpIHtcbiAgICAgICAgICAgICAgICAgICAgZGF0YSA9IGRhdGEuc29ydChhc2NBbGdvKTtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIGN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WV0YWRhdGEobWludCksXG4gICAgICApO1xuICAgICAgZGVidWdMb2coJyMgZmluZEJ5TWludCBtZXRhZGF0YTogJywgbWV0YWRhdGEpO1xuICAgICAgLy8gdG9rZW5TdGFuZGFyZDogMChORlQpIG9yIDIgKFNQTC1UT0tFTilcbiAgICAgIGlmIChtZXRhZGF0YS50b2tlblN0YW5kYXJkICE9PSB0b2tlblN0YW5kYXJkKSB7XG4gICAgICAgIHRocm93IEVycm9yKCd0b2tlbiBzdGFuZGFyZHMgYXJlIGRpZmZlcmVudCcpO1xuICAgICAgfVxuICAgICAgY29uc3QgaW5mbyA9IGF3YWl0IGNvbm5lY3Rpb24uZ2V0UGFyc2VkQWNjb3VudEluZm8obWludC50b1B1YmxpY0tleSgpKTtcbiAgICAgIGNvbnN0IHRva2VuQW1vdW50ID0gKGluZm8udmFsdWU/LmRhdGEgYXMgUGFyc2VkQWNjb3VudERhdGEpLnBhcnNlZC5pbmZvXG4gICAgICAgIC5zdXBwbHkgYXMgc3RyaW5nO1xuXG4gICAgICBjb25zdCByZXNwb25zZSA9IChhd2FpdCAoXG4gICAgICAgIGF3YWl0IGZldGNoKG1ldGFkYXRhLmRhdGEudXJpKVxuICAgICAgKS5qc29uKCkpIGFzIE9mZmNoYWluO1xuICAgICAgcmV0dXJuIFJlc3VsdC5vayhcbiAgICAgICAgY29udmVydGVyPFQ+KHRva2VuU3RhbmRhcmQsIG1ldGFkYXRhLCByZXNwb25zZSwgdG9rZW5BbW91bnQpLFxuICAgICAgKTtcbiAgICB9IGNhdGNoIChlKSB7XG4gICAgICByZXR1cm4gUmVzdWx0LmVycihlIGFzIEVycm9yKTtcbiAgICB9XG4gIH07XG5cbiAgLyoqXG4gICAqIEZldGNoIG1pbnRlZCBtZXRhZGF0YSBieSBvd25lciBQdWJrZXlcbiAgICpcbiAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAqIEBwYXJhbSB7T25Pa30gb25PayBjYWxsYmFjayBmdW5jdGlvblxuICA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AgICAgICBzb3VyY2VUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgZGVzdFRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgQ2FsY3VsYXRvci5jYWxjdWxhdGVBbW91bnQoYW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgICAga2V5cGFpcnMsXG4gICAgICAgICk7XG4gICAgICAgIHR4LmFkZChpbnN0Mik7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICAvLyByZXR1cm4gaW5zdHJ1Y3Rpb24gYW5kIHVuZGVjaWRlZCBhc3NvY2lhdGVkIHRva2VuIGFjY291bnRcbiAgICAgICAgaW5zdDIgPSBjcmVhdGVUcmFuc2ZlckNoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgICBzb3VyY2VUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgZGVzdFRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgQ2FsY3VsYXRvci5jYWxjdWxhdGVBbW91bnQoYW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgICAga2V5cGFpcnMsXG4gICAgICAgICk7XG4gICAgICAgIHR4LmFkZChkZXN0VG9rZW4uaW5zdCkuYWRkKGluc3QyKTtcbiAgICAgIH1cblxuICAgICAgdHgucmVjZW50QmxvY2toYXNoID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcbiAgICAgIGtleXBhaXJzLmZvckVhY2goKHNpZ25lcikgPT4ge1xuICAg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nRQdWJrZXk6IG1pbnQsXG4gICAgICAgIHNwYWNlOiBNSU5UX1NJWkUsXG4gICAgICAgIGxhbXBvcnRzOiBsYW1wb3J0cyxcbiAgICAgICAgcHJvZ3JhbUlkOiBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgfSksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlSW5pdGlhbGl6ZU1pbnRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBvd25lcixcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICBmZWVQYXllcixcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgbWludCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBDYWxjdWxhdGUuY2FsY3VsYXRlQW1vdW50KHRvdGFsQW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNZXRhZGF0YUFjY291bnRWM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgbWV0YWRhdGE6IG1ldGFkYXRhUGRhLFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNZXRhZGF0YUFjY291bnRBcmdzVjM6IHtcbiAgICAgICAgICAgIGRhdGE6IHRva2VuTWV0YWRhdGEsXG4gICAgICAgICAgICBpc011dGFibGUsXG4gICAgICAgICAgICBjb2xsZWN0aW9uRGV0YWlsczogbnVsbCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuICAgIHJldHVybiBpbnN0cnVjdGlvbnM7XG4gIH07XG5cbiAgLyoqXG4gICAqIFNQTC1UT0tFTiBtaW50XG4gICAqXG4gICAqIEBwYXJhbSB7UHVia2V5fSBvd25lciAgICAgICAvLyB0b2tlbiBvd25lclxuICAgKiBAcGFyYW0ge1NlY3JldH0gc2lnbmVyICAgICAgLy8gdG9rZW4gb3duZXIgU2VjcmV0XG4gICAqIEBwYXJhbSB7bnVtYmVyfSB0b3RhbEFtb3VudCAvLyB0b3RhbCBudW1iZXJcbiAgICogQHBhcmFtIHtudW1iZXJ9IG1pbnREZWNpbWFsIC8vIHRva2VuIGRlY2ltYWxcbiAgICogQHBhcmFtIHtJbnB1dFRva2VuTWV0YWRhdGF9IGlucHV0ICAgICAgIC8vIHRva2VuIG1ldGFkYXRhXG4gICAqIEBwYXJhbSB7UGFydGlhbDxNaW50T3B0aW9ucz59IG9wdGlvbnMgICAvLyBvcHRpb25zXG4gICAqIEByZXR1cm4gUHJvbWlzZTxSZXN1bHQ8TWludEluc3RydWN0aW9uLCBFcnJvcj4+XG4gICAqL1xuICBleHBvcnQgY29uc3QgbWludCA9IGFzeW5jIChcbiAgICBvd25lcjogUHVia2V5LFxuICAgIHNpZ25lcjogU2VjcmV0LFxuICAgIHRvdGFsQW1vdW50OiBudW1iZXIsXG4gICAgbWludERlY2ltYWw6I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ludHMsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBkYXRhdjI6ICcsIGRhdGF2Mik7XG4gICAgICBkZWJ1Z0xvZygnIyB1cGxvYWQgY29udGVudCB1cmw6ICcsIHVyaSk7XG5cbiAgICAgIGNvbnN0IG1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG4gICAgICBjb25zdCBpbnN0cyA9IGF3YWl0IGNyZWF0ZU1pbnQoXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgdG90YWxBbW91bnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RzLnB1c2goXG4gICAgICAgICAgY3JlYXRlRnJlZXplQXV0aG9yaXR5KFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLk1pbnQoXG4gICAgICAgIGluc3RzLFxuICAgICAgICBbc2lnbmVyLnRvS2V5cGFpcigpLCBtaW50LnRvS2V5cGFpcigpXSxcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIG1pbnQucHVia2V5LFxuICAgICAgKTtcbiAgICB9KTtcbiAgfTtcbn1cbiIsICJpbXBvcnQgeyBDb25zdGFudHMsI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NyZXRbXSxcbiAgICBhbW91bnQ6IG51bWJlcixcbiAgICBtaW50RGVjaW1hbDogbnVtYmVyLFxuICAgIG9wdGlvbnM6IFBhcnRpYWw8TWludE9wdGlvbnM+ID0ge30sXG4gICk6IFByb21pc2U8UmVzdWx0PENvbW1vblN0cnVjdHVyZSwgRXJyb3I+PiA9PiB7XG4gICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCBwYXllciA9IG9wdGlvbnMuZmVlUGF5ZXIgPyBvcHRpb25zLmZlZVBheWVyIDogc2lnbmVyc1swXTtcbiAgICAgIGNvbnN0IGtleXBhaXJzID0gc2lnbmVycy5tYXAoKHMpID0+IHMudG9LZXlwYWlyKCkpO1xuXG4gICAgICBjb25zdCBzb3VyY2VUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5yZXRyeUdldE9yQ3JlYXRlKFxuICAgICAgICBtaW50LFxuICAgICAgICBvd25lcixcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBkZXN0VG9rZW4gPSBhd2FpdCBBY2NvdW50LkFzc29jaWF0ZWQucmV0cnlHZXRPckNyZWF0ZShcbiAgICAgICAgbWludCxcbiAgICAgICAgZGVzdCxcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpbnN0ID0gY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHNvdXJjZVRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgZGVzdFRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIENhbGN1bGF0b3IuY2FsY3VsYXRlQW1vdW50KGFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAga2V5cGFpcnMsXG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raGFzaE9iai5sYXN0VmFsaWRCbG9ja0hlaWdodDtcbiAgICAgICAgdHJhbnNhY3Rpb24ucmVjZW50QmxvY2toYXNoID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IG9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IE1BWF9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIGlmIChOb2RlLmdldENvbm5lY3Rpb24oKS5ycGNFbmRwb2ludCA9PT0gQ29uc3RhbnRzLkVuZFBvaW50VXJsLnByZCkge1xuICAgICAgICAgIGRlYnVnTG9nKCcjIENoYW5nZSBtZXRhcGxleCBjbHVzdGVyIG9uIG1haW5uZXQtYmV0YScpO1xuICAgICAgICAgIE5vZGUuY2hhbmdlQ29ubmVjdGlvbih7IGNsdXN0ZXI6IENvbnN0YW50cy5DbHVzdGVyLnByZE1ldGFwbGV4IH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgIG9wdGl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uICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICApO1xuXG4gICAgICBpZiAoIXJlcy5pbnN0KSB7XG4gICAgICAgIHJldHVybiByZXMudG9rZW5BY2NvdW50O1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb248UHVia2V5PihcbiAgICAgICAgW3Jlcy5pbnN0XSxcbiAgICAgICAgW10sXG4gICAgICAgIGZlZVBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICByZXMudG9rZW5BY2NvdW50ISxcbiAgICAgICk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFJldHJ5IGZ1bmN0aW9uIGlmIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtTZWNyZXR9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IHJldHJ5R2V0T3JDcmVhdGUgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICApOiBQcm9taXNlPHN0cmluZz4gPT4ge1xuICAgICAgbGV0IGNvdW50ZXIgPSAxO1xuICAgICAgd2hpbGUgKGNvdW50ZXIgPCBSRVRSWV9PVkVSX0xJTUlUKSB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgY29uc3QgaW5zdCA9IGF3YWl0IGdldChtaW50LCBvd25lciwgZmVlUGF5ZXIsIHRydWUpO1xuXG4gICAgICAgICAgaWYgKGluc3QgJiYgdHlwZW9mIGluc3QgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBpbnN0KTtcbiAgICAgICAgICAgIHJldHVybiBpbnN0O1xuICAgICAgICAgIH0gZWxzZSBpZiAoaW5zdCBpbnN0YW5jZW9mIFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24pIHtcbiAgICAgICAgICAgIChhd2FpdCBpbnN0LnN1Ym1pdCgpKS5tYXAoXG4gICAgICAgICAgICAgIGFzeW5jIChvazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2coYCMgbWludDogJHttaW50fSwgb3duZXI6ICR7b3duZXJ9LCBmZWVQYXllcjogJHtmZWVQYXllcn1gKTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBzbGVlcChSRVRSWV9TTEVFUF9USU1FKTtcbiAgICAgICAgY291bnRlcisrO1xuICAgICAgfVxuICAgICAgdGhyb3cgRXJyb3IoYHJldHJ5IGFjdGlvbiBpcyBvdmVyIGxpbWl0ICR7UkVUUllfT1ZFUl9MSU1JVH1gKTtcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogW01haW4gbG9naWNdR2V0IEFzc29jaWF0ZWQgdG9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biAgICAgICAgYXdhaXQgZ2V0QWNjb3VudChcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLmNvbW1pdG1lbnQsXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCBicyBmcm9tICdiczU4JztcblxuZXhwb3J0IG5hbWVzcGFjZSBBY2NvdW50IHtcbiAgZXhwb3J0IGNsYXNzIEtleXBhaXIge1xuICAgIHNlY3JldDogU2VjcmV0O1xuICAgIHB1YmtleTogUHVia2V5O1xuXG4gICAgY29uc3RydWN0b3IocGFyYW1zOiB7IHB1YmtleT86IFB1YmtleTsgc2VjcmV0OiBTZWNyZXQgfSkge1xuICAgICAgaWYgKCFwYXJhbXMucHVia2V5KSB7XG4gICAgICAgIGNvbnN0IGtleXBhaXIgPSBwYXJhbXMuc2VjcmV0LnRvS2V5cGFpcigpO1xuICAgICAgICB0aGlzLnB1YmtleSA9IGtleXBhaXIucHVibGljS2V5LnRvU3RyaW5nKCk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB0aGlzLnB1YmtleSA9IHBhcmFtcy5wdWJrZXk7XG4gICAgICB9XG4gICAgICB0aGlzLnNlY3JldCA9IHBhcmFtcy5zZWNyZXQ7XG4gICAgfVxuXG4gICAgdG9QdWJsaWNLZXkoKTogUHVibGljS2V5IHtcbiAgICAgIHJldHVybiBuZXcgUHVibGljS2V5KHRoaXMucHVia2V5KTtcbiAgICB9XG5cbiAgICB0b0tleXBhaXIoKTogT3JpZ2luYWwge1xuICAgICAgY29uc3QgZGVjb2RlZCA9IGJzLmRlY29kZSh0aG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ID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gb3V0cHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAg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VR5cGUsXG4gICAgICAgIGZlZVBheWVyPzogU2VjcmV0LFxuICAgICAgKSA9PiBQcm9taXNlPFJlc3VsdDxzdHJpbmcsIEVycm9yPj4sXG4gICAgICBzdG9yYWdlVHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICBmZWVQYXllcj86IFNlY3JldCxcbiAgICApOiBQcm9taXNlPFByb3BlcnRpZXM+ID0+IHtcbiAgICAgIGlmICghaW5wdXQgfHwgIWlucHV0LmZpbGVzKSB7XG4gICAgICAgIHJldHVybiB7fTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZmlsZXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgICAgaW5wdXQuZmlsZXMubWFwKGFzeW5jIChmaWxlKSA9PiB7XG4gICAgICAgICAgaWYgKCFmaWxlLmZpbGVQYXRoKSB7XG4gICAgICAgICAgICByZXR1cm4ge307XG4gICAgICAgICAgfVxuICAgICAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IGNhbGxiYWNrRnVuYyhmaWxlLmZpbGVQYXRoLCBzdG9yYWdlVHlwZSwgZmVlUGF5ZXIpO1xuICAgICAgICAgIGlmIChyZXMuaXNFcnIpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKHJlcy5lcnJvci5tZXNzYWdlKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIG92ZXJ3cml0ZU9iamVjdChmaWxlLCBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGV4aXN0c0tleTogJ2ZpbGVQYXRoJyxcbiAgICAgICAgICAgICAgd2lsbDogeyBrZXk6ICd1cmknLCB2YWx1ZTogcmVzLnZhbHVlIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIF0pO1xuICAgICAgICB9KSxcbiAgICAgICk7XG4gICAgICByZXR1cm4geyAuLi5pbnB1dCwgZmlsZXMgfSBhcyBQcm9wZXJ0aWVzO1xuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQgeyBQYXJzZ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ICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTeW1ib2wobWV0YWRhdGEuc3ltYm9sKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZXMgJiYgcmVzLmlzRXJyKSB7XG4gICAgICAgICAgcmVzdWx0cy5wdXNoKC4uLnJlcy5lcnJvci5kZXRhaWxzKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICBpZiAocmVzdWx0cy5sZW5ndGggPiAwKSB7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPVxuICAgICAgICAgICdDYXVnaHQgaW4gdGhlIHZhbGlkYXRpb24gZXJyb3JzLiBzZWUgaW5mb3JtYXRpb24gZS5nOiBlcnI8VmFsaWRhdG9yRXJyb3I+LmRldGFpbHMnO1x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Nvbm5lY3Rpb24sXG4gICAgICAgICAgICBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShtaW50KSxcbiAgICAgICAgICApO1xuICAgICAgICAgIGRlYnVnTG9nKCcjIGZpbmRCeU93bmVyIG1ldGFkYXRhOiAnLCBtZXRhZGF0YSk7XG4gICAgICAgICAgLy8gdG9rZW5TdGFuZGFyZDogMChORlQpIG9yIDIgKFNQTC1UT0tFTilcbiAgICAgICAgICBpZiAobWV0YWRhdGEudG9rZW5TdGFuZGFyZCAhPT0gdG9rZW5TdGFuZGFyZCkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuICAgICAgICAgIGZldGNoKG1ldGFkYXRhLmRhdGEudXJpKVxuICAgICAgICAgICAgLnRoZW4oKHJlc3BvbnNlKSA9PiB7XG4gICAgICAgICAgICAgIHJlc3BvbnNlXG4gICAgICAgICAgICAgICAgLmpzb24oKVxuICAgICAgICAgICAgICAgIC50aGVuKChqc29uOiBPZmZjaGFpbikgPT4ge1xuICAgICAgICAgICAgICAgICAgZGF0YS5wdXNoKFxuICAgICAgICAgICAgICAgICAgICBjb252ZXJ0ZXI8VD4odG9rZW5TdGFuZGFyZCwgbWV0YWRhdGEsIGpzb24sIHRva2VuQW1vdW50KSxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICBjYWxsYmFjayhSZXN1bHQub2soZGF0YSkpOyAvLyBuZWVkIHRoaXMgY2FsbCA/XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAuY2F0Y2goKGUpID0+IHtcbiAgICAgICAgICAgICAgICAgIGNhbGxiYWNrKFJlc3VsdC5lcnIoZSkpO1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgLmZpbmFsbHkoKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgY29uc3QgZGVzY0FsZ28gPSBzb3J0QnlVaW5peFRpbWVzdGFtcDxUPihTb3J0RGlyZWN0aW9uLkRlc2MpO1xuICAgICAgICAgICAgICAgICAgY29uc3QgYXNjQWxnbyA9IHNvcnRCeVVpbml4VGltZXN0YW1wPFQ+KFNvcnREaXJlY3Rpb24uQXNjKTtcbiAgICAgICAgICAgICAgICAgIGlmIChzb3J0YWJsZSA9PT0gU29ydERpcmVjdGlvbi5EZXNjKSB7XG4gICAgICAgICAgICAgICAgICAgIGRhdGEgPSBkYXRhLnNvcnQoZGVzY0FsZ28pO1xuICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChzb3J0YWJsZSA9PT0gU29ydERpcmVjdGlvbi5Bc2MpIHtcbiAgICAgICAgICAgICAgICAgICAgZGF0YSA9IGRhdGEuc29ydChhc2NBbGdvKTtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIGNhbGxiYWNrKFJlc3VsdC5vayhkYXRhKSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgLmNhdGNoKChlKSA9PiB7XG4gICAgICAgICAgICAgIGNhbGxiYWNrKFJlc3VsdC5lcnIoZSkpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBpZiAoZSBpbnN0YW5jZW9mIEVycm9yICYmIFVOQUJMRV9FUlJPUl9SRUdFWC50ZXN0KGUubWVzc2FnZSkpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIHNraXAgZXJyb3IgZm9yIG9sZCBTUEwtVE9LRU46ICcsIG1pbnQpO1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfSBjYXRjaCAoZSkge1xuICAgICAgaWYgKGUgaW5zdGFuY2VvZiBFcnJvcikge1xuICAgICAgICBjYWxsYmFjayhSZXN1bHQuZXJyKGUpKTtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IGdlbmVyaWNGaW5kQnlNaW50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29uc3QgdHggPSBuZXcgVHJhbnNhY3Rpb24oe1xuICAgICAgICBsYXN0VmFsaWRCbG9ja0hlaWdodDogYmxvY2toYXNoT2JqLmxhc3RWYWxpZEJsb2NrSGVpZ2h0LFxuICAgICAgICBibG9ja2hhc2g6IGJsb2NraGFzaE9iai5ibG9ja2hhc2gsXG4gICAgICAgIGZlZVBheWVyOiBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgfSk7XG5cbiAgICAgIC8vIHJldHVybiBhc3NvY2lhdGVkIHRva2VuIGFjY291bnRcbiAgICAgIGlmICghZGVzdFRva2VuLmluc3QpIHtcbiAgICAgICAgaW5zdDIgPSBjcmVhdGVUcmFuc2ZlckNoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgICBzb3VyY2VUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgZGVzdFRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgIENhbGN1bGF0b3IuY2FsY3VsYXRlQW1vdW50KGFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICAgIFtvd25lci50b0tleXBhaXIoKV0sXG4gICAgICAgICk7XG4gICAgICAgIHR4LmFkZChpbnN0Mik7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICAvLyByZXR1cm4gaW5zdHJ1Y3Rpb24gYW5kIHVuZGVjaWRlZCBhc3NvY2lhdGVkIHRva2VuIGFjY291bnRcbiAgICAgICAgaW5zdDIgPSBjcmVhdGVUcmFuc2ZlckNoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgICBzb3VyY2VUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIC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E1pbnQoY29ubmVjdGlvbik7XG4gICAgY29uc3QgbWV0YWRhdGFQZGEgPSBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShtaW50LnRvU3RyaW5nKCkpO1xuICAgIGNvbnN0IHRva2VuQXNzb2NpYXRlZCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKG1pbnQsIG93bmVyKTtcbiAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBbXTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgU3lzdGVtUHJvZ3JhbS5jcmVhdGVBY2NvdW50KHtcbiAgICAgICAgZnJvbVB1YmtleTogZmVlUGF5ZXIsXG4gICAgICAgIG5ld0FjY291bnRQdWJrZXk6IG1pbnQsXG4gICAgICAgIHNwYWNlOiBNSU5UX1NJWkUsXG4gICAgICAgIGxhbXBvcnRzOiBsYW1wb3J0cyxcbiAgICAgICAgcHJvZ3JhbUlkOiBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgfSksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlSW5pdGlhbGl6ZU1pbnRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBvd25lcixcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICBmZWVQYXllcixcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgbWludCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBDYWxjdWxhdGUuY2FsY3VsYXRlQW1vdW50KHRvdGFsQW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNZXRhZGF0YUFjY291bnRWM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgbWV0YWRhdGE6IG1ldGFkYXRhUGRhLFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNZXRhZGF0YUFjY291bnRBcmdzVjM6IHtcbiAgICAgICAgICAgIGRhdGE6IHRva2VuTWV0YWRhdGEsXG4gICAgICAgICAgICBpc011dGFibGUsXG4gICAgICAgICAgICBjb2xsZWN0aW9uRGV0YWlsczogbnVsbCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuICAgIHJldHVybiBpbnN0cnVjdGlvbnM7XG4gIH07XG5cbiAgLyoqXG4gICAqIFNQTC1UT0tFTiBtaW50XG4gICAqXG4gICAqIEBwYXJhbSB7U2VjcmV0fSBvd25lciAgICAgIC8vIHRva2VuIG93bmVyIFNlY3JldFxuICAgKiBAcGFyYW0ge251bWJlcn0gdG90YWxBbW91bnQgLy8gdG90YWwgbnVtYmVyXG4gICAqIEBwYXJhbSB7bnVtYmVyfSBtaW50RGVjaW1hbCAvLyB0b2tlbiBkZWNpbWFsXG4gICAqIEBwYXJhbSB7SW5wdXRUb2tlbk1ldGFkYXRhfSBpbn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0aHJvdyB1cGxvYWRlZDtcbiAgICAgICAgfVxuICAgICAgICB1cmkgPSB1cGxvYWRlZC52YWx1ZTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHRocm93IEVycm9yKGBNdXN0IHNldCBmaWxlUGF0aCcgb3IgJ3VyaSdgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gdHJ1ZTtcblxuICAgICAgY29uc3QgZGF0YXYyID0gQ29udmVydGVyLlRva2VuTWV0YWRhdGEuaW50b0luZnJhKFxuICAgICAgICBpbnB1dCxcbiAgICAgICAgdXJpLFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcbiAgICAgIGRlYnVnTG9nKCcjIHVwbG9hZCBjb250ZW50IHVybDogJywgdXJpKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgdG90YWxBbW91bnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RzLnB1c2goXG4gICAgICAgICAgY3JlYXRlRnJlZXplQXV0aG9yaXR5KFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG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VyIiwgInVwbG9hZEZpbGUiLCAiQXJ3ZWF2ZSIsICJOZnRTdG9yYWdlIiwgIlN0b3JhZ2UiLCAiU3BsVG9rZW4iLCAibWludCIsICJBY2NvdW50IiwgImdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jIiwgIlRPS0VOX1BST0dSQU1fSUQiLCAiY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uIiwgImNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbiIsICJDb252ZXJ0ZXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jIiwgIlNwbFRva2VuIiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImNyZWF0ZVRyYW5zZmVyQ2hlY2tlZEluc3RydWN0aW9uIiwgIlNwbFRva2VuIiwgIkFjY291bnQiLCAiY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24iLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlNwbFRva2VuIl0KfQo= \ No newline at end of file diff --git a/packages/suite-spl-token/src/add.ts b/packages/suite-spl-token/src/add.ts index 6594becd7..bfdbb1366 100644 --- a/packages/suite-spl-token/src/add.ts +++ b/packages/suite-spl-token/src/add.ts @@ -11,14 +11,14 @@ export namespace SplToken { export const add = async ( token: Pubkey, owner: Pubkey, - signers: Secret[], + ownerOrMultisig: Secret[], totalAmount: number, mintDecimal: number, options: Partial = {}, ): Promise, Error>> => { return Try(async () => { - const payer = options.feePayer ? options.feePayer : signers[0]; - const keypairs = signers.map((s) => s.toKeypair()); + const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); const tokenAssociated = await Account.Associated.retryGetOrCreate( token, diff --git a/packages/suite-spl-token/src/burn.ts b/packages/suite-spl-token/src/burn.ts index 8760adfb4..199dc45cc 100644 --- a/packages/suite-spl-token/src/burn.ts +++ b/packages/suite-spl-token/src/burn.ts @@ -13,7 +13,7 @@ export namespace SplToken { export const burn = ( mint: Pubkey, owner: Pubkey, - signers: Secret[], + ownerOrMultisig: Secret[], burnAmount: number, tokenDecimals: number, options: Partial = {}, @@ -23,8 +23,8 @@ export namespace SplToken { mint.toPublicKey(), owner.toPublicKey(), ); - const payer = options.feePayer ? options.feePayer : signers[0]; - const keypairs = signers.map((s) => s.toKeypair()); + const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); const inst = createBurnCheckedInstruction( tokenAccount, diff --git a/packages/suite-spl-token/src/gas-less-transfer.ts b/packages/suite-spl-token/src/gas-less-transfer.ts index cd8773175..2821fa11e 100644 --- a/packages/suite-spl-token/src/gas-less-transfer.ts +++ b/packages/suite-spl-token/src/gas-less-transfer.ts @@ -11,19 +11,17 @@ import { PartialSignStructure } from '~/types/transaction-builder'; export namespace SplToken { export const gasLessTransfer = async ( mint: Pubkey, - owner: Pubkey, + owner: Secret, dest: Pubkey, - signers: Secret[], amount: number, mintDecimal: number, feePayer: Pubkey, ): Promise> => { return Try(async () => { - const keypairs = signers.map((s) => s.toKeypair()); - + const ownerPublicKey = owner.toKeypair().publicKey; const sourceToken = await Account.Associated.makeOrCreateInstruction( mint, - owner, + ownerPublicKey.toString(), feePayer, ); @@ -48,10 +46,10 @@ export namespace SplToken { sourceToken.tokenAccount.toPublicKey(), mint.toPublicKey(), destToken.tokenAccount.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, Calculator.calculateAmount(amount, mintDecimal), mintDecimal, - keypairs, + [owner.toKeypair()], ); tx.add(inst2); } else { @@ -60,18 +58,16 @@ export namespace SplToken { sourceToken.tokenAccount.toPublicKey(), mint.toPublicKey(), destToken.tokenAccount.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, Calculator.calculateAmount(amount, mintDecimal), mintDecimal, - keypairs, + [owner.toKeypair()], ); tx.add(destToken.inst).add(inst2); } tx.recentBlockhash = blockhashObj.blockhash; - keypairs.forEach((signer) => { - tx.partialSign(signer); - }); + tx.partialSign(owner.toKeypair()); const serializedTx = tx.serialize({ requireAllSignatures: false, diff --git a/packages/suite-spl-token/src/mint.ts b/packages/suite-spl-token/src/mint.ts index cf6357273..7339101b5 100644 --- a/packages/suite-spl-token/src/mint.ts +++ b/packages/suite-spl-token/src/mint.ts @@ -25,7 +25,7 @@ import { debugLog, Result, Try, unixTimestamp } from '~/shared'; import { Node } from '~/node'; import { Account } from '~/account'; import { TransactionBuilder } from '~/transaction-builder'; -import { Pubkey, Secret } from '~/types/account'; +import { Secret } from '~/types/account'; import { InputNftMetadata } from '~/types/regular-nft'; import { InputTokenMetadata, MintOptions } from '~/types/spl-token'; import { Converter } from '~/converter'; @@ -127,8 +127,7 @@ export namespace SplToken { /** * SPL-TOKEN mint * - * @param {Pubkey} owner // token owner - * @param {Secret} signer // token owner Secret + * @param {Secret} owner // token owner Secret * @param {number} totalAmount // total number * @param {number} mintDecimal // token decimal * @param {InputTokenMetadata} input // token metadata @@ -136,8 +135,7 @@ export namespace SplToken { * @return Promise> */ export const mint = async ( - owner: Pubkey, - signer: Secret, + owner: Secret, totalAmount: number, mintDecimal: number, input: InputTokenMetadata, @@ -151,9 +149,10 @@ export namespace SplToken { const { feePayer, freezeAuthority } = options; const storageType = input.storageType || DEFAULT_STORAGE_TYPE; - const payer = feePayer ? feePayer : signer; + const payer = feePayer ? feePayer : owner; input.royalty = 0; const sellerFeeBasisPoints = 0; + const ownerPublicKey = owner.toKeypair().publicKey; const storageMetadata = Storage.toConvertOffchaindata( input as InputNftMetadata, @@ -206,7 +205,7 @@ export namespace SplToken { const mint = Account.Keypair.create(); const insts = await createMint( mint.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, totalAmount, mintDecimal, datav2, @@ -219,7 +218,7 @@ export namespace SplToken { insts.push( createFreezeAuthority( mint.toPublicKey(), - owner.toPublicKey(), + ownerPublicKey, freezeAuthority.toPublicKey(), ), ); @@ -227,7 +226,7 @@ export namespace SplToken { return new TransactionBuilder.Mint( insts, - [signer.toKeypair(), mint.toKeypair()], + [owner.toKeypair(), mint.toKeypair()], payer.toKeypair(), mint.pubkey, ); diff --git a/packages/suite-spl-token/src/transfer.ts b/packages/suite-spl-token/src/transfer.ts index 4cd506e00..0d77bc958 100644 --- a/packages/suite-spl-token/src/transfer.ts +++ b/packages/suite-spl-token/src/transfer.ts @@ -12,14 +12,14 @@ export namespace SplToken { mint: Pubkey, owner: Pubkey, dest: Pubkey, - signers: Secret[], + ownerOrMultisig: Secret[], amount: number, mintDecimal: number, options: Partial = {}, ): Promise> => { return Try(async () => { - const payer = options.feePayer ? options.feePayer : signers[0]; - const keypairs = signers.map((s) => s.toKeypair()); + const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); const sourceToken = await Account.Associated.retryGetOrCreate( mint, diff --git a/packages/suite-spl-token/test/add.test.ts b/packages/suite-spl-token/test/add.test.ts index f3e156811..a94cb1782 100644 --- a/packages/suite-spl-token/test/add.test.ts +++ b/packages/suite-spl-token/test/add.test.ts @@ -27,7 +27,6 @@ test.before(async () => { test('Add minting token', async (t) => { const inst = await SplToken.mint( - source.pubkey, source.secret, TOKEN_TOTAL_AMOUNT, MINT_DECIMAL, diff --git a/packages/suite-spl-token/test/burn.test.ts b/packages/suite-spl-token/test/burn.test.ts index b6afe98c7..55a99cb9a 100644 --- a/packages/suite-spl-token/test/burn.test.ts +++ b/packages/suite-spl-token/test/burn.test.ts @@ -25,7 +25,6 @@ test.before(async () => { test('Create token, burn token', async (t) => { const inst1 = await SplToken.mint( - source.pubkey, source.secret, TOKEN_TOTAL_AMOUNT, MINT_DECIMAL, diff --git a/packages/suite-spl-token/test/freeze-thaw.test.ts b/packages/suite-spl-token/test/freeze-thaw.test.ts index 5c0e53dec..8d149772a 100644 --- a/packages/suite-spl-token/test/freeze-thaw.test.ts +++ b/packages/suite-spl-token/test/freeze-thaw.test.ts @@ -19,7 +19,6 @@ test('Freezing and Thawing a target nft', async (t) => { const owner = Account.Keypair.create(); const freezeAuthority = Account.Keypair.create(); const inst1 = await SplToken.mint( - owner.pubkey, owner.secret, 10000000, 2, diff --git a/packages/suite-spl-token/test/gas-less-transfer.test.ts b/packages/suite-spl-token/test/gas-less-transfer.test.ts index b4d384adc..f857e5968 100644 --- a/packages/suite-spl-token/test/gas-less-transfer.test.ts +++ b/packages/suite-spl-token/test/gas-less-transfer.test.ts @@ -31,7 +31,6 @@ test('transfer feePayerPartialSign', async (t) => { t.log('# receipt: ', receipt.pubkey); const inst1 = await SplToken.mint( - tokenOwner.pubkey, tokenOwner.secret, TOKEN_TOTAL_AMOUNT, MINT_DECIMAL, @@ -48,9 +47,8 @@ test('transfer feePayerPartialSign', async (t) => { const serialized = await SplToken.gasLessTransfer( token, - tokenOwner.pubkey, + tokenOwner.secret, receipt.pubkey, - [tokenOwner.secret], 100, MINT_DECIMAL, source.pubkey, diff --git a/packages/suite-spl-token/test/mint.test.ts b/packages/suite-spl-token/test/mint.test.ts index 16e27c069..a9e7ca496 100644 --- a/packages/suite-spl-token/test/mint.test.ts +++ b/packages/suite-spl-token/test/mint.test.ts @@ -27,7 +27,6 @@ test('Create token', async (t) => { }; const inst = await SplToken.mint( - source.pubkey, source.secret, TOKEN_TOTAL_AMOUNT, MINT_DECIMAL, @@ -53,7 +52,6 @@ test('Create token, always uploaed image', async (t) => { }; const inst = await SplToken.mint( - source.pubkey, source.secret, TOKEN_TOTAL_AMOUNT, MINT_DECIMAL, @@ -92,7 +90,6 @@ test('Create token with creators, freezeAuthority', async (t) => { ], }; const inst = await SplToken.mint( - source.pubkey, source.secret, TOKEN_TOTAL_AMOUNT, MINT_DECIMAL, diff --git a/packages/suite-spl-token/test/transfer.test.ts b/packages/suite-spl-token/test/transfer.test.ts index f4f51c069..12f799745 100644 --- a/packages/suite-spl-token/test/transfer.test.ts +++ b/packages/suite-spl-token/test/transfer.test.ts @@ -27,7 +27,6 @@ test.before(async () => { test('Create token, batch transfer', async (t) => { const inst1 = await SplToken.mint( - source.pubkey, source.secret, TOKEN_TOTAL_AMOUNT, MINT_DECIMAL, diff --git a/packages/test-tools/dist/index.js b/packages/test-tools/dist/index.js index 8ecdbbc65..2d06bebc6 100644 --- a/packages/test-tools/dist/index.js +++ b/packages/test-tools/dist/index.js @@ -1746,23 +1746,22 @@ var import_web310 = require("@solana/web3.js"); var SolNative2; ((SolNative6) => { const RADIX = 10; - SolNative6.gasLessTransfer = async (owner, dest, signers, amount, feePayer) => { + SolNative6.gasLessTransfer = async (owner, dest, amount, feePayer) => { return Try(async () => { const blockHashObj = await Node.getConnection().getLatestBlockhash(); + const ownerPublicKey = owner.toKeypair().publicKey; const tx = new import_web310.Transaction({ blockhash: blockHashObj.blockhash, lastValidBlockHeight: blockHashObj.lastValidBlockHeight, feePayer: feePayer.toPublicKey() }).add( import_web310.SystemProgram.transfer({ - fromPubkey: owner.toPublicKey(), + fromPubkey: ownerPublicKey, toPubkey: dest.toPublicKey(), lamports: parseInt(`${amount.toLamports()}`, RADIX) }) ); - signers.forEach((signer) => { - tx.partialSign(signer.toKeypair()); - }); + tx.partialSign(owner.toKeypair()); const serializedTx = tx.serialize({ requireAllSignatures: false }); @@ -1777,17 +1776,17 @@ var import_web311 = require("@solana/web3.js"); var SolNative3; ((SolNative6) => { const RADIX = 10; - SolNative6.transfer = (source, dest, signers, amount, options = {}) => { + SolNative6.transfer = (source, dest, ownerOrMultisig, amount, options = {}) => { return Try(() => { const inst = import_web311.SystemProgram.transfer({ fromPubkey: source.toPublicKey(), toPubkey: dest.toPublicKey(), lamports: parseInt(`${amount.toLamports()}`, RADIX) }); - const payer = options.feePayer ? options.feePayer.toKeypair() : signers[0].toKeypair(); + const payer = options.feePayer ? options.feePayer.toKeypair() : ownerOrMultisig[0].toKeypair(); return new TransactionBuilder6.Common( [inst], - signers.map((s) => s.toKeypair()), + ownerOrMultisig.map((s) => s.toKeypair()), payer ); }); @@ -1799,11 +1798,11 @@ var import_spl_token2 = require("@solana/spl-token"); var SolNative4; ((SolNative6) => { const RADIX = 10; - SolNative6.transferWithMultisig = async (owner, dest, signers, amount, options = {}) => { + SolNative6.transferWithMultisig = async (owner, dest, ownerOrMultisig, amount, options = {}) => { return Try(async () => { const connection = Node.getConnection(); - const payer = options.feePayer ? options.feePayer : signers[0]; - const keypairs = signers.map((s) => s.toKeypair()); + const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); const wrapped = await (0, import_spl_token2.createWrappedNativeAccount)( connection, payer.toKeypair(), @@ -1851,7 +1850,7 @@ var SolNative4; ); return new TransactionBuilder6.Common( instructions, - signers.map((s) => s.toKeypair()), + ownerOrMultisig.map((s) => s.toKeypair()), payer.toKeypair() ); }); @@ -1891,4 +1890,4 @@ var requestSol = async (pubkey, sol = 0.1) => { 0 && (module.exports = { requestSol }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9yZXF1ZXN0LXNvbC50cyIsICIuLi8uLi9zaGFyZWQvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vc2hhcmVkL3NyYy9zaGFyZWQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l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tlbkFjY291bnQ6ICcsIGluc3QpO1xuICAgICAgICAgICAgcmV0dXJuIGluc3Q7XG4gICAgICAgICAgfSBlbHNlIGlmIChpbnN0IGluc3RhbmNlb2YgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbikge1xuICAgICAgICAgICAgKGF3YWl0IGluc3Quc3VibWl0KCkpLm1hcChcbiAgICAgICAgICAgICAgYXN5bmMgKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZWF0ZSB0b2tlbiBhY2NvdW50OiBgLCBlKTtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyBtaW50OiAke21pbnR9LCBvd25lcjogJHtvd25lcn0sIGZlZVBheWVyOiAke2ZlZVBheWVyfWApO1xuICAgICAgICB9XG4gICAgICAgIGF3YWl0IHNsZWVwKFJFVFJZX1NMRUVQX1RJTUUpO1xuICAgICAgICBjb3VudGVyKys7XG4gICAgICB9XG4gICAgICB0aHJvdyBFcnJvcihgcmV0cnkgYWN0aW9uIGlzIG92ZXIgbGltaXQgJHtSRVRSWV9PVkVSX0xJTUlUfWApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBbTWFpbiBsb2dpY11HZXQgQXNzb2NpYXRlZCB0b2tlb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nZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG5cbiAgICAgICAgc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hdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9XG4gICAgICAgICAgJ0NhdWdodCBpbiB0aGUgdmFsaWRhdGlvbiBlcnJvcnMuIHNlZSBpbmZvcm1hdGlvbiBl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uc2FjdGlvbi5tZXNzYWdlLmluc3RydWN0aW9ucy5mb3JFYWNoKFxuICAgICAgICAgICAgICAgICAgKGluc3RydWN0aW9uKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICBpc1BhcnNlZEluc3RydWN0aW9uKGluc3RydWN0aW9uKSAmJlxuICAgICAgICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIucHJvZ3JhbS5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnByb2dyYW0sXG4gICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyID0gaW5zdHJ1Y3Rpb247XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgIC8vIHNwbC10b2tlbiBvciBzeXN0ZW1cbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyICYmXG4gICAgICAgICAgICAgICAgICBtb2R1bGVOYW1lICE9PSBpbnN0cnVjdGlvblRyYW5zZmVyWydwcm9ncmFtJ11cbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgIGRlYnVnTG9nKFxuICAgICAgICAgICAgICAgICAgICAnIyBGaWx0ZXJUeXBlLk1lbW8gYnJlYWsgaW5zdHJ1Y3Rpb246ICcsXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gZmV0Y2ggbWVtbyBvbmx5IHRyYW5zYWN0aW9uXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5Pbmx5TWVtbzoge1xuICAgICAgICAgICAgICBpZiAoRmlsdGVyT3B0aW9ucy5NZW1vLnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkpIHtcbiAgICAgICAgICAgICAgICBsZXQgaW5zdHJ1Y3Rpb25UcmFuc2ZlcjtcblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuTWludDoge1xuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkgJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NaW50LmludG9Vc2VyU2lkZShpbnN0cnVjdGlvbiwgdHhNZXRhKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5UcmFuc2ZlcjpcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgPT09IGluc3RydWN0aW9uLnByb2dyYW0gJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGlmIChpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSA9PT0gJ3RyYW5zZmVyQ2hlY2tlZCcpIHtcbiAgICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuVHJhbnNmZXJDaGVja2VkLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuVHJhbnNmZXIuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgIC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UludChgJHthbW91bnQudG9MYW1wb3J0cygpfWAsIFJBRElYKSxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIHdyYXBwZWQgc29sOiAnLCB3cmFwcGVkLnRvQmFzZTU4KCkpO1xuXG4gICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBbXTtcblxuICAgICAgY29uc3QgdG9rZW4gPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgMCxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IHNvdXJjZVRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIHRva2VuLnRvU3RyaW5nKCksXG4gICAgICAgIG93bmVyLFxuICAgICAgICBwYXllcixcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIHNvdXJjZVRva2VuOiAnLCBzb3VyY2VUb2tlbik7XG5cbiAgICAgIGNvbnN0IGRlc3RUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5yZXRyeUdldE9yQ3JlYXRlKFxuICAgICAgICB0b2tlbi50b1N0cmluZygpLFxuICAgICAgICB3cmFwcGVkLnRvU3RyaW5nKCksXG4gICAgICAgIHBheWVyLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgZGVzdFRva2VuOiAnLCBkZXN0VG9rZW4pO1xuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlVHJhbnNmZXJJbnN0cnVjdGlvbihcbiAgICAgICAgICBzb3VyY2VUb2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGRlc3RUb2tlbi50b1B1YmxpY0tleSgpLFxuICAgICA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3QgcmV0cnlHZXRPckNyZWF0ZSA9IGFzeW5jIChcbiAgICAgIG1pbnQ6IFB1YmtleSxcbiAgICAgIG93bmVyOiBQdWJrZXksXG4gICAgICBmZWVQYXllcjogU2VjcmV0LFxuICAgICk6IFByb21pc2U8c3RyaW5nPiA9PiB7XG4gICAgICBsZXQgY291bnRlciA9IDE7XG4gICAgICB3aGlsZSAoY291bnRlciA8IFJFVFJZX09WRVJfTElNSVQpIHtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICBjb25zdCBpbnN0ID0gYXdhaXQgZ2V0KG1pbnQsIG93bmVyLCBmZWVQYXllciwgdHJ1ZSk7XG5cbiAgICAgICAgICBpZiAoaW5zdCAmJiB0eXBlb2YgaW5zdCA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGluc3QpO1xuICAgICAgICAgICAgcmV0dXJuIGluc3Q7XG4gICAgICAgICAgfSBlbHNlIGlmIChpbnN0IGluc3RhbmNlb2YgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbikge1xuICAgICAgICAgICAgKGF3YWl0IGluc3Quc3VibWl0KCkpLm1hcChcbiAgICAgICAgICAgICAgYXN5bmMgKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAo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GNvbnN0IGFzc29jaWF0ZWRUb2tlbkFjY291bnQgPSBnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyhcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9y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dXJuIGlucHV0IS5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKFxuICAgICAgb3V0cHV0OiBPcHRpb248SW50ZXJuYWxDcmVhdG9yc1tdPixcbiAgICApOiBDcmVhdG9yc1tdIHwgdW5kZWZpbmVkID0+IHtcbiAgICAgIGlmICghb3V0cHV0KSB7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBvdXRwdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvU3RyaW5nKCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGRhdGEudmVyaWZpZWQsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgbmFtZXNwYWNlIFJveWFsdHkge1xuICAgIGV4cG9ydCBjb25zdCBUSFJFU0hPTEQgPSAxMDA7XG4gICAgZXhwb3J0IGNvbnN0IGludG9JbmZyYSA9IChwZXJjZW50YWdlOiBudW1iZXIpID0+IHtcbiAgICAgIHJldHVybiBwZXJjZW50YWdlICogVEhSRVNIT0xEO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b1VzZXIgPSAocGVyY2VudGFnZTogbnVtYmVyKSA9PiB7XG4gICAgICByZXR1cm4gcGVyY2VudGFnZSAqIFR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ICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5pbWFnZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc0ltYWdlVXJsKG1ldGFkYXRhLmltYWdlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3JveWFsdHknOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5yb3lhbHR5KSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICA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y3Rpb25zLmZvckVhY2goKGluc3RydWN0aW9uKSA9PiB7XG4gICAgICAgIGlmIChpc1BhcnNlZEluc3RydWN0aW9uKGluc3RydWN0aW9uKSkge1xuICAgICAgICAgIHN3aXRjaCAoZmlsdGVyVHlwZSkge1xuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk1lbW86IHtcbiAgICAgICAgICAgICAgaWYgKEZpbHRlck9wdGlvbnMuTWVtby5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pKSB7XG4gICAgICAgICAgICAgICAgbGV0IGluc3RydWN0aW9uVHJhbnNmZXI7XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCAgdHJhbnNmZXIgdHJhbnNhY3Rpb24gZm9yIHJlbGF0aW9uYWwgbWVtb1xuICAgICAgICAgICAgICAgIHR4TWV0YS50cmFuc2FjdGlvbi5tZXNzYWdlLmluc3RydWN0aW9ucy5mb3JFYWNoKFxuICAgICAgICAgICAgICAgICAgKGluc3RydWN0aW9uKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICBpc1BhcnNlZEluc3RydWN0aW9uKGluc3RydWN0aW9uKSAmJlxuICAgICAgICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIucHJvZ3JhbS5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnByb2dyYW0sXG4gICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyID0gaW5zdHJ1Y3Rpb247XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgIC8vIHNwbC10b2tlbiBvciBzeXN0ZW1cbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyICYmXG4gICAgICAgICAgICAgICAgICBtb2R1bGVOYW1lICE9PSBpbnN0cnVjdGlvblRyYW5zZmVyWydwcm9ncmFtJ11cbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgIGRlYnVnTG9nKFxuICAgICAgICAgICAgICAgICAgICAnIyBGaWx0ZXJUeXBlLk1lbW8gYnJlYWsgaW5zdHJ1Y3Rpb246ICcsXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gZmV0Y2ggbWVtbyBvbmx5IHRyYW5zYWN0aW9uXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5Pbmx5TWVtbzoge1xuICAgICAgICAgICAgICBpZiAoRmlsdGVyT3B0aW9ucy5NZW1vLnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkpIHtcbiAgICAgICAgICAgICAgICBsZXQgaW5zdHJ1Y3Rpb25UcmFuc2ZlcjtcblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuTWludDoge1xuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkgJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NaW50LmludG9Vc2VyU2lkZShpbnN0cnVjdGlvbiwgdHhNZXRhKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5UcmFuc2ZlcjpcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgPT09IGluc3RydWN0aW9uLnByb2dyYW0gJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICA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1cmUsIEVycm9yPj4gPT4ge1xuICAgIHJldHVybiBUcnkoYXN5bmMgKCkgPT4ge1xuICAgICAgY29uc3QgY29ubmVjdGlvbiA9IE5vZGUuZ2V0Q29ubmVjdGlvbigpO1xuICAgICAgY29uc3QgcGF5ZXIgPSBvcHRpb25zLmZlZVBheWVyID8gb3B0aW9ucy5mZWVQYXllciA6IG93bmVyT3JNdWx0aXNpZ1swXTtcbiAgICAgIGNvbnN0IGtleXBhaXJzID0gb3duZXJPck11bHRpc2lnLm1hcCgocykgPT4gcy50b0tleXBhaXIoKSk7XG4gICAgICBjb25zdCB3cmFwcGVkID0gYXdhaXQgY3JlYXRlV3JhcHBlZE5hdGl2ZUFjY291bnQoXG4gICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBwYXJzZUludChgJHthbW91bnQudG9MYW1wb3J0cygpfWAsIFJBRElYKSxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIHdyYXBwZWQgc29sOiAnLCB3cmFwcGVkLnRvQmFzZTU4KCkpO1xuXG4gICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBbXTtcblxuICAgICAgY29uc3QgdG9rZW4gPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgMCxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IHNvdXJjZVRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIHRva2VuLnRvU3RyaW5nKCksXG4gICAgICAgIG93bmVyLFxuICAgICAgICBwYXllcixcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIHNvdXJjZVRva2VuOiAnLCBzb3VyY2VUb2tlbik7XG5cbiAgICAgIGNvbnN0IGRlc3RUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5yZXRyeUdldE9yQ3JlYXRlKFxuICAgICAgICB0b2tlbi50b1N0cmluZygpLFxuICAgICAgICB3cmFwcGVkLnRvU3RyaW5nKCksXG4gICAgICAgIHBheWVyLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgZGVzdFRva2VuOiAnLCBkZXN0VG9rZW4pO1xuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlVHJhbnNmZXJJbnN0cnVjdGlvbihcbiAgICAgICAgICBzb3VyY2VUb2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGRlc3RUb2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgcGFyc2VJbnQoYCR7YW1vdW50fWAsIFJBRElYKSwgLy8gTm8gbGFtcG9ydHMsIGl0cyBzb2xcbiAgICAgICAgICBrZXlwYWlycyxcbiAgICAgICAgKSxcbiAgICAgICk7XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVDbG9zZUFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICB3cmFwcGVkLFxuICAgICAgICAgIGRlc3QudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGtleXBhaXJzLFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKFxuICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgIG93bmVyT3JNdWx0aXNpZy5tYXAoKHMpID0+IHMudG9LZXlwYWlyKCkpLFxuICAgICAgICBw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iwgIlNvbE5hdGl2ZSIsICJpbXBvcnRfd2ViMyIsICJTb2xOYXRpdmUiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImltcG9ydF93ZWIzIiwgIlNvbE5hdGl2ZSIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X3NwbF90b2tlbiIsICJTb2xOYXRpdmUiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiU29sTmF0aXZlIiwgImZzIiwgIlNvbE5hdGl2ZSIsICJhc3NlcnQiXQp9Cg== \ No newline at end of file diff --git a/packages/test-tools/dist/index.mjs b/packages/test-tools/dist/index.mjs index 33eeaa4d8..dea68033c 100644 --- a/packages/test-tools/dist/index.mjs +++ b/packages/test-tools/dist/index.mjs @@ -1732,23 +1732,22 @@ import { SystemProgram, Transaction as Transaction5 } from "@solana/web3.js"; var SolNative2; ((SolNative6) => { const RADIX = 10; - SolNative6.gasLessTransfer = async (owner, dest, signers, amount, feePayer) => { + SolNative6.gasLessTransfer = async (owner, dest, amount, feePayer) => { return Try(async () => { const blockHashObj = await Node.getConnection().getLatestBlockhash(); + const ownerPublicKey = owner.toKeypair().publicKey; const tx = new Transaction5({ blockhash: blockHashObj.blockhash, lastValidBlockHeight: blockHashObj.lastValidBlockHeight, feePayer: feePayer.toPublicKey() }).add( SystemProgram.transfer({ - fromPubkey: owner.toPublicKey(), + fromPubkey: ownerPublicKey, toPubkey: dest.toPublicKey(), lamports: parseInt(`${amount.toLamports()}`, RADIX) }) ); - signers.forEach((signer) => { - tx.partialSign(signer.toKeypair()); - }); + tx.partialSign(owner.toKeypair()); const serializedTx = tx.serialize({ requireAllSignatures: false }); @@ -1763,17 +1762,17 @@ import { SystemProgram as SystemProgram2 } from "@solana/web3.js"; var SolNative3; ((SolNative6) => { const RADIX = 10; - SolNative6.transfer = (source, dest, signers, amount, options = {}) => { + SolNative6.transfer = (source, dest, ownerOrMultisig, amount, options = {}) => { return Try(() => { const inst = SystemProgram2.transfer({ fromPubkey: source.toPublicKey(), toPubkey: dest.toPublicKey(), lamports: parseInt(`${amount.toLamports()}`, RADIX) }); - const payer = options.feePayer ? options.feePayer.toKeypair() : signers[0].toKeypair(); + const payer = options.feePayer ? options.feePayer.toKeypair() : ownerOrMultisig[0].toKeypair(); return new TransactionBuilder6.Common( [inst], - signers.map((s) => s.toKeypair()), + ownerOrMultisig.map((s) => s.toKeypair()), payer ); }); @@ -1790,11 +1789,11 @@ import { var SolNative4; ((SolNative6) => { const RADIX = 10; - SolNative6.transferWithMultisig = async (owner, dest, signers, amount, options = {}) => { + SolNative6.transferWithMultisig = async (owner, dest, ownerOrMultisig, amount, options = {}) => { return Try(async () => { const connection = Node.getConnection(); - const payer = options.feePayer ? options.feePayer : signers[0]; - const keypairs = signers.map((s) => s.toKeypair()); + const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); const wrapped = await createWrappedNativeAccount( connection, payer.toKeypair(), @@ -1842,7 +1841,7 @@ var SolNative4; ); return new TransactionBuilder6.Common( instructions, - signers.map((s) => s.toKeypair()), + ownerOrMultisig.map((s) => s.toKeypair()), payer.toKeypair() ); }); @@ -1881,4 +1880,4 @@ var requestSol = async (pubkey, sol = 0.1) => { export { requestSol }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL3JlcXVlc3Qtc29sLnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvY29uc3RhbnRzLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2JhdGNoLnRzIiwgIi4uLy4uL25vZGUvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbW1vbi50cyIsICIuLi8uLi9zaGFyZWQvc3JjL3NoYXJlZC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGV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AgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGFyci5mbGF0TWFwKChhKSA9PiBhLmluc3RydWN0aW9ucyk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gYXJyLmZpbHRlcigoYSkgPT4gYS5mZWVQYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXIucHVibGljS2V5O1xuICAgICAgICAgIGZpbmFsU2lnbmVycyA9IFtmZWVQYXllciwgLi4uc2lnbmVyc107XG4gICAgICAgIH1cbiAgICAgICAgaW5zdHJ1Y3Rpb25zLm1hcCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICAvLyBDYWxjdWxhdGVUeHNpemUuaXNNYXhUcmFuc2FjdGlvblNpemUodHJhbnNhY3Rpb24sIGZlZVBheWVyLnB1YmxpY0tleSk7XG5cbiAgICAgICAgY29uc3Qgb3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogTUFYX1JFV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CbG9ja0hlaWdodCA9IGJsb2NraGFzaE9iai5sYXN0VmFsaWRCbG9ja0hlaWdodDtcbiAgICAgICAgdHJhbnNhY3Rpb24ucmVjZW50QmxvY2toYXNoID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IG9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IE1BWF9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICBvcHRpb25zLFxuICAgICAgICApO1xuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEFueU9iamVjdCB9IGZyb20gJ34vdHlwZXMvc2hhcmVkJztcbmltcG9ydCB7IENvbnN0YW50cyB9IGZyb20gJy4vY29uc3RhbnRzJztcbmltcG9ydCB7IFJlc3VsdCB9IGZyb20gJy4vcmVzdWx0JztcblxuLyoqXG4gKiBjb252ZXJ0IGJ1ZmZlciB0byBBcnJheVxuICpcbiAqIEBwYXJh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sXG4gICAgICAgIG5ldyBLZXlwYWlyLktleXBhaXIoeyBzZWNyZXQ6IGZlZVBheWVyIH0pLnB1YmtleSxcbiAgICAgICAgYWxsb3dPd25lck9mZkN1cnZlLFxuICAgICAgKTtcblxuICAgICAgaWYgKCFyZXMuaW5zdCkge1xuICAgICAgICByZXR1cm4gcmVzLnRva2VuQWNjb3VudDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uPFB1YmtleT4oXG4gICAgICAgIFtyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVlUGF5ZXJ9YCk7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoUkVUUllfU0xFRVBfVElNRSk7XG4gICAgICAgIGNvdW50ZXIrKztcbiAgICAgIH1cbiAgICAgIHRocm93IEVycm9yKGByZXRyeSBhY3Rpb24gaXMgb3ZlciBsaW1pdCAke1JFVFJZX09WRVJfTElNSVR9YCk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFtNYWluIGxvZ2ljXUdldCBBc3NvY2lhdGVkIHRva2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFT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IGludG9JbmZyYSA9IChcbiAgICAgIGlucHV0OiBPcHRpb248SW5wdXRDcmVhdG9yc1tdPiB8IHVuZGVmaW5lZCxcbiAgICApOiBPcHRpb248SW50ZXJuYWxDcmVhdG9yc1tdPiA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b0NvbXByZXNzZWROZnRJbmZyYSA9IChcbiAgICAgIGlucHV0OiBPcHRpb248SW5wdXRDcmVhdG9yc1tdPiB8IHVuZGVmaW5lZCxcbiAgICApOiBJbnRlcm5hbENyZWF0b3JzW10gPT4ge1xuICAgICAgaWYgKCFpbnB1dCkge1xuICAgICAgICByZXR1cm4gW107XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQhLm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b1VzZXIgPSAoXG4gICAgICBvdXRwdXQ6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+LFxuICAgICk6IENyZWF0b3JzW10gfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdX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wgdW5kZWZpbmVkLFxuICAgICAgY2FsbGJhY2tGdW5jOiAoXG4gICAgICAgIGZpbGVQYXRoOiBGaWxlVHlwZSxcbiAgICAgICAgc3RvcmFnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgICBmZWVQYXllcj86IFNlY3JldCxcbiAgICAgICkgPT4gUHJvbWlzZTxSZXN1bHQ8c3RyaW5nLCBFcnJvcj4+LFxuICAgICAgc3RvcmFnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgZmVlUGF5ZXI/OiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxQcm9wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG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gICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3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J1Y3Rpb25UcmFuc2ZlcjtcblxuICAgICAgICAgICAgICAgIC8vIGZldGNoICB0cmFuc2ZlciB0cmFuc2FjdGlvbiBmb3IgcmVsYXRpb25hbCBtZW1vXG4gICAgICAgICAgICAgICAgdHhNZXRhLnRyYW5zYWN0aW9uLm1lc3NhZ2UuaW5zdHJ1Y3Rpb25zLmZvckVhY2goXG4gICAgICAgICAgICAgICAgICAoaW5zdHJ1Y3Rpb24pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgIGlzUGFyc2VkSW5zdHJ1Y3Rpb24oaW5zdHJ1Y3Rpb24pICYmXG4gICAgICAgICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5wcm9ncmFtLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucHJvZ3JhbSxcbiAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgPSBpbnN0cnVjdGlvbjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgLy8gc3BsLXRva2VuIG9yIHN5c3RlbVxuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgJiZcbiAgICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgIT09IGluc3RydWN0aW9uVHJhbnNmZXJbJ3Byb2dyYW0nXVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgZGVidWdMb2coXG4gICAgICAgICAgICAgICAgICAgICcjIEZpbHRlclR5cGUuTWVtbyBicmVhayBpbnN0cnVjdGlvbjogJyxcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCBtZW1vIG9ubHkgdHJhbnNhY3Rpb25cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk9ubHlNZW1vOiB7XG4gICAgICAgICAgICAgIGlmIChGaWx0ZXJPcHRpb25zLk1lbW8ucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSkge1xuICAgICAgICAgICAgICAgIGxldCBpbnN0cnVjdGlvblRyYW5zZmVyO1xuXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5NaW50OiB7XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1pbnQuaW50b1VzZXJTaWRlKGluc3RydWN0aW9uLCB0eE1ldGEpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLlRyYW5zZmVyOlxuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgbW9kdWxlTmFtZSA9PT0gaW5zdHJ1Y3Rpb24ucHJvZ3JhbSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaWYgKGluc3RydWN0aW9uLnBhcnNlZC50eXBlID09PSAndHJhbnNmZXJDaGVja2VkJykge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2ZlckNoZWNrZWQuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2Zlci5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICByZXR1cm4gaGlzdG9yeTtcbiAgICB9O1xufVxuIiwgImltcG9ydCB7IFBhcnNlZEFjY291bnREYXRhIH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFJlc3VsdCwgVHJ5IH0gZnJvbSAnfi9zaGFyZWQnO1xuaW1wb3J0IHsgTm9kZSB9IGZyb20gJ34vbm9kZSc7XG5pbXBvcnQgeyBQdWJrZXksIE93bmVySW5mbyB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgeyBUcmFuc2FjdGlvbkZpbHRlciB9IGZyb20gJ34vdHJhbnNhY3Rpb24tZmlsdGVyJztcblxuZXhwb3J0IG5hbWVzcGFjZSBTb2xOYXRpdmUge1xuICBleHBvcnQgY29uc3QgZmluZEJ5T3duZXIgPSBhc3luYyAoXG4gICAgb3duZXI6IFB1YmtleSxcbiAgKTogUHJvbWlzZTxSZXN1bHQ8T3duZXJJbmZvLCBFcnJvcj4+ID0+IHtcbiAgICByZXR1cm4gVHJ5KGFzeW5jICgpID0+IHtcbiAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldFBhcnNlZEFjY291bnRJbmZvKFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgKTtcblxuICAgICAgY29uc3QgaW5mbyA9IHtcbiAgICAgICAgc29sOiAwLFx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VjdGlvbixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIHBhcnNlSW50KGAke2Ftb3VudC50b0xhbXBvcnRzKCl9YCwgUkFESVgpLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgd3JhcHBlZCBzb2w6ICcsIHdyYXBwZWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IFtdO1xuXG4gICAgICBjb25zdCB0b2tlbiA9IGF3YWl0IGNyZWF0ZU1pbnQoXG4gICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAwLFxuICAgICAgKTtcblxuICAgICAgY29uc3Qgc291cmNlVG9rZW4gPSBhd2FpdCBBY2NvdW50LkFzc29jaWF0ZWQucmV0cnlHZXRPckNyZWF0ZShcbiAgICAgICAgdG9rZW4udG9TdHJpbmcoKSxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIHBheWVyLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgc291cmNlVG9rZW46ICcsIHNvdXJjZVRva2VuKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIHRva2VuLnRvU3RyaW5nKCksXG4gICAgICAgIHdyYXBwZWQudG9TdHJpbmcoKSxcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBkZXN0VG9rZW46ICcsIGRlc3RUb2tlbik7XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVUcmFuc2Zlckluc3RydWN0aW9uKFxuICAgICAgICAgIHNvdXJjZVRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgZGVzdFRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBwYXJzZUludChgJHthbW91bnR9YCwgUkFESVgpLCAvLyBObyBsYW1wb3J0cywgaXRzIHNvbFxuICAgICAgICAgIGtleXBhaXJzLFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZUNsb3NlQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHdyYXBwZWQsXG4gICAgICAgICAgZGVzdC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAga2V5cGFpcnMsXG4gICAgICAgICksXG4gICAgICApO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24oXG4gICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgc2lnbmVycy5tYXAoKHMpID0+IHMudG9LZXlwYWlyKCkpLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICk7XG4gICAgfSk7XG4gIH07XG59XG4iLCAiaW1wb3J0IHsgU29sTmF0aXZlIGFzIEZpbmQgfSBmcm9tICcuL2ZpbmQnO1xuaW1wb3J0IHsgU29sTmF0aXZlIGFzIEdhc0xlc3MgfSBmcm9tICcuL2dhcy1sZXNzLXRyYW5zZmVyJztcbmltcG9ydCB7IFNvbE5hdGl2ZSBhcyBUcmFuc2ZlciB9IGZyb20gJy4vdHJhbnNmZXInO1xuaW1wb3J0IHsgU29sTmF0aXZlIGFzIFRyYW5zZmVyV2l0aE11bHRpc2lnIH0gZnJvbSAnLi90cmFuc2Zlci13aXRoLW11bHRpc2lnJztcbmltcG9ydCAnfi90eXBlcy90cmFuc2FjdGlvbi1idWlsZGVyJztc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igoYSkgPT4gYS5mZWVQYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXIucHVibGljS2V5O1xuICAgICAgICAgIGZpbmFsU2lnbmVycyA9IFtmZWVQYXllciwgLi4uc2lnbmVyc107XG4gICAgICAgIH1cbiAgICAgICAgaW5zdHJ1Y3Rpb25zLm1hcCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICAvLyBDYWxjdWxhdGVUeHNpemUuaXNNYXhUcmFuc2FjdGlvblNpemUodHJhbnNhY3Rpb24sIGZlZVBheWVyLnB1YmxpY0tleSk7XG5cbiAgICAgICAgY29uc3Qgb3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogTUFYX1JFVFJJRVMsXG4gICAgICAgIH07XG5cbiAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICk7XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLC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29tbW9uPFB1YmtleT4oXG4gICAgICAgIFtyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVlUGF5ZXJ9YCk7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoUkVUUllfU0xFRVBfVElNRSk7XG4gICAgICAgIGNvdW50ZXIrKztcbiAgICAgIH1cbiAgICAgIHRocm93IEVycm9yKGByZXRyeSBhY3Rpb24gaXMgb3ZlciBsaW1pdCAke1JFVFJZX09WRVJfTElNSVR9YCk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFtNYWluIGxvZ2ljXUdldCBBc3NvY2lhdGVkIHRva2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleS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5wcm90b3R5cGUuc3VibWl0ID0gYXN5bmMgZnVuY3Rpb24gKGZlZVBheWVyPzogU2VjcmV0KSB7XG4gIGlmIChmZWVQYXllcikge1xuICAgIGxldCBpID0gMTtcbiAgICBmb3IgYXdhaXQgKGNvbnN0IG9iaiBvZiB0aGlzKSB7XG4gICAgICBpZiAob2JqLmlzRXJyKSB7XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgICB9IGVsc2UgaWYgKG9iai52YWx1ZS5jYW5TdWJtaXQpIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIGNhblN1Ym1pdCcpO1xuICAgICAgICBjb25zdCBzaWcgPSBhd2FpdCAob2JqIGFzIFBhcnRpYWxTaWduU3RydWN0dXJlKS5zdWJtaXQoZmVlUGF5ZXIpO1xuICAgICAgICBpZiAoc2lnLmlzRXJyKSB7XG4gICAgICAgICAgcmV0dXJuIHNpZztcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhzaWcudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIG90aGVyIHRoYW4gY2FuU3VibWl0Jyk7XG4gICAgICAgIGlmICh0aGlzLmxlbmd0aCA9PSBpKSB7XG4gICAgICAgICAgLy8gbGFzdCBvYmplY3RcbiAgICAgICAgICByZXR1cm4gb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICAgIH1cbiAgICAgICAgb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICB9XG4gICAgICBpKys7XG4gICAgfVxuICB9IGVsc2Uge1xuICAgIGNvbnN0IGluc3RydWN0aW9uczogQ29tbW9uU3RydWN0dXJlIHwgTWludFN0cnVjdHVyZVtdID0gW107XG4gICAgZm9yIChjb25zdCBvYmogb2YgdGhpcykge1xuICAgICAgaWYgKG9iai5pc0Vycikge1xuICAgICAgICByZXR1cm4gb2JqO1xuICAgICAgfSBl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XBlLFxuICAgICAgZmVlUGF5ZXI/OiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxQcm9wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgUGFyc2VkVHJhbnNhY3Rpb25XaXRoTWV0YSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQb3N0VG9rZW5BY2NvdW50IH0gZnJvbSAnfi90eXBlcy90cmFuc2FjdGlvbi1maWx0Z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mFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW9uIGUuZzogZXJyPFZhbGlkYXRvckVycm9yPi5kZXRhaWxzJztcbiAgICAgICAgdGhyb3cgbmV3IFZhbGlkYXRvckVycm9yKG1lc3NhZ2UsIHJlc3VsdHMpO1xuICAgICAgfVxuICAgIC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gICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgIGlzUGFyc2VkSW5zdHJ1Y3Rpb24oaW5zdHJ1Y3Rpb24pICYmXG4gICAgICAgICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5wcm9ncmFtLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucHJvZ3JhbSxcbiAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgPSBpbnN0cnVjdGlvbjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgLy8gc3BsLXRva2VuIG9yIHN5c3RlbVxuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgJiZcbiAgICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgIT09IGluc3RydWN0aW9uVHJhbnNmZXJbJ3Byb2dyYW0nXVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgZGVidWdMb2coXG4gICAgICAgICAgICAgICAgICAgICcjIEZpbHRlclR5cGUuTWVtbyBicmVhayBpbnN0cnVjdGlvbjogJyxcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCBtZW1vIG9ubHkgdHJhbnNhY3Rpb25cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk9ubHlNZW1vOiB7XG4gICAgICAgICAgICAgIGlmIChGaWx0ZXJPcHRpb25zLk1lbW8ucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSkge1xuICAgICAgICAgICAgICAgIGxldCBpbnN0cnVjdGlvblRyYW5zZmVyO1xuXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5NaW50OiB7XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1pbnQuaW50b1VzZXJTaWRlKGluc3RydWN0aW9uLCB0eE1ldGEpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLlRyYW5zZmVyOlxuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgbW9kdWxlTmFtZSA9PT0gaW5zdHJ1Y3Rpb24ucHJvZ3JhbSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaWYgKGluc3RydWN0aW9uLnBhcnNlZC50eXBlID09PSAndHJhbnNmZXJDaGVja2VkJykge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2ZlckNoZWNrZWQuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2Zlci5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgIC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N0IGluc3RydWN0aW9ucyA9IFtdO1xuXG4gICAgICBjb25zdCB0b2tlbiA9IGF3YWl0IGNyZWF0ZU1pbnQoXG4gICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAwLFxuICAgICAgKTtcblxuICAgICAgY29uc3Qgc291cmNlVG9rZW4gPSBhd2FpdCBBY2NvdW50LkFzc29jaWF0ZWQucmV0cnlHZXRPckNyZWF0ZShcbiAgICAgICAgdG9rZW4udG9TdHJpbmcoKSxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIHBheWVyLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgc291cmNlVG9rZW46ICcsIHNvdXJjZVRva2VuKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIHRva2VuLnRvU3RyaW5nKCksXG4gICAgICAgIHdyYXBwZWQudG9TdHJpbmcoKSxcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBkZXN0VG9rZW46ICcsIGRlc3RUb2tlbik7XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVUcmFuc2Zlckluc3RydWN0aW9uKFxuICAgICAgICAgIHNvdXJjZVRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgZGVzdFRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBwYXJzZUludChgJHthbW91bnR9YCwgUkFESVgpLCAvLyBObyBsYW1wb3J0cywgaXRzIHNvbFxuICAgICAgICAgIGtleXBhaXJzLFxuICAgICAgICApLFxuICAgICAgKTt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0ZW1Qcm9ncmFtIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJTb2xOYXRpdmUiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiU29sTmF0aXZlIiwgIlNvbE5hdGl2ZSJdCn0K \ No newline at end of file diff --git a/packages/test-tools/tsconfig.json b/packages/test-tools/tsconfig.json index eacf61e7e..2b15d6730 100644 --- a/packages/test-tools/tsconfig.json +++ b/packages/test-tools/tsconfig.json @@ -4,12 +4,8 @@ "display": "test-tools", "compilerOptions": { "paths": { - "~/types/*": [ - "../types/src/*/index.ts" - ], - "~/*": [ - "../*/src/index.ts" - ], + "~/types/*": ["../types/src/*/index.ts"], + "~/*": ["../*/src/index.ts"], "~/shared/exports": ["../shared/src/exports.ts"] } }, diff --git a/packages/transaction-builder/test/calculate-txsize.test.ts b/packages/transaction-builder/test/calculate-txsize.test.ts index 39daead70..8998a1f58 100644 --- a/packages/transaction-builder/test/calculate-txsize.test.ts +++ b/packages/transaction-builder/test/calculate-txsize.test.ts @@ -70,7 +70,6 @@ test('[Over size]Calculate transaction size', async (t) => { }; const inst = await CompressedNft.mint( - source.pubkey, source.secret, { filePath: asset.filePath as string, @@ -156,7 +155,6 @@ test('[Under size]Calculate transaction size', async (t) => { }; const inst = await CompressedNft.mint( - source.pubkey, source.secret, { filePath: asset.filePath as string, diff --git a/packages/types/dist/mint-8edd0151.d.ts b/packages/types/dist/mint-08f26d69.d.ts similarity index 91% rename from packages/types/dist/mint-8edd0151.d.ts rename to packages/types/dist/mint-08f26d69.d.ts index 71ff03e1d..a4ef3afad 100644 --- a/packages/types/dist/mint-8edd0151.d.ts +++ b/packages/types/dist/mint-08f26d69.d.ts @@ -52,4 +52,4 @@ type MintOptions = { feePayer: Secret; }; -export { Creators as C, InputCreators as I, MintOptions as M, Option as O, Uses as U, UseMethod as a, bignum as b, InputCollection as c, Options as d, InputNftMetadata as e }; +export { Creators as C, InputCreators as I, MintOptions as M, Options as O, Uses as U, Option as a, bignum as b, UseMethod as c, InputCollection as d, InputNftMetadata as e }; diff --git a/packages/types/dist/mint-a48f3fac.d.ts b/packages/types/dist/mint-74b505a0.d.ts similarity index 91% rename from packages/types/dist/mint-a48f3fac.d.ts rename to packages/types/dist/mint-74b505a0.d.ts index b7fd1b7c2..9cc11e20c 100644 --- a/packages/types/dist/mint-a48f3fac.d.ts +++ b/packages/types/dist/mint-74b505a0.d.ts @@ -52,4 +52,4 @@ type MintOptions = { feePayer: Secret; }; -export { Creators as C, InputCreators as I, MintOptions as M, Option as O, Uses as U, UseMethod as a, bignum as b, InputCollection as c, Options as d, InputNftMetadata as e }; +export { Creators as C, InputCreators as I, MintOptions as M, Options as O, Uses as U, Option as a, bignum as b, UseMethod as c, InputCollection as d, InputNftMetadata as e }; diff --git a/packages/types/dist/regular-nft.d.mts b/packages/types/dist/regular-nft.d.mts index f5d0d01ff..553becc53 100644 --- a/packages/types/dist/regular-nft.d.mts +++ b/packages/types/dist/regular-nft.d.mts @@ -1,6 +1,6 @@ -import { O as Option, C as Creators, U as Uses } from './mint-a48f3fac.js'; -export { c as InputCollection, I as InputCreators, e as InputNftMetadata, M as MintOptions, d as Options, a as UseMethod, b as bignum } from './mint-a48f3fac.js'; -import { Pubkey, Secret } from './account.mjs'; +import { Secret, Pubkey } from './account.mjs'; +import { a as Option, C as Creators, U as Uses } from './mint-74b505a0.js'; +export { d as InputCollection, I as InputCreators, e as InputNftMetadata, M as MintOptions, O as Options, c as UseMethod, b as bignum } from './mint-74b505a0.js'; import { Offchain } from './storage.mjs'; import 'bn.js'; import '@solana/web3.js'; @@ -9,6 +9,10 @@ import './das-api.mjs'; import './converter.mjs'; import '@metaplex-foundation/mpl-token-metadata'; +type BurnOptions = { + feePayer: Secret; +}; + type GasLessMintOptions = { freezeAuthority: Pubkey; }; @@ -45,4 +49,12 @@ type MintCollectionOptions = { collectionSize: number; }; -export { Collection, CollectionDetails, Creators, GasLessMintOptions, MintCollectionOptions, Option, RegularNftMetadata, Uses }; +type ThawOptions = { + feePayer: Secret; +}; + +type TransferOptions = { + feePayer: Secret; +}; + +export { BurnOptions, Collection, CollectionDetails, Creators, GasLessMintOptions, MintCollectionOptions, Option, RegularNftMetadata, ThawOptions, TransferOptions, Uses }; diff --git a/packages/types/dist/regular-nft.d.ts b/packages/types/dist/regular-nft.d.ts index ccc3a7bee..0f6338cbf 100644 --- a/packages/types/dist/regular-nft.d.ts +++ b/packages/types/dist/regular-nft.d.ts @@ -1,6 +1,6 @@ -import { O as Option, C as Creators, U as Uses } from './mint-8edd0151.js'; -export { c as InputCollection, I as InputCreators, e as InputNftMetadata, M as MintOptions, d as Options, a as UseMethod, b as bignum } from './mint-8edd0151.js'; -import { Pubkey, Secret } from './account.js'; +import { Secret, Pubkey } from './account.js'; +import { a as Option, C as Creators, U as Uses } from './mint-08f26d69.js'; +export { d as InputCollection, I as InputCreators, e as InputNftMetadata, M as MintOptions, O as Options, c as UseMethod, b as bignum } from './mint-08f26d69.js'; import { Offchain } from './storage.js'; import 'bn.js'; import '@solana/web3.js'; @@ -9,6 +9,10 @@ import './das-api.js'; import './converter.js'; import '@metaplex-foundation/mpl-token-metadata'; +type BurnOptions = { + feePayer: Secret; +}; + type GasLessMintOptions = { freezeAuthority: Pubkey; }; @@ -45,4 +49,12 @@ type MintCollectionOptions = { collectionSize: number; }; -export { Collection, CollectionDetails, Creators, GasLessMintOptions, MintCollectionOptions, Option, RegularNftMetadata, Uses }; +type ThawOptions = { + feePayer: Secret; +}; + +type TransferOptions = { + feePayer: Secret; +}; + +export { BurnOptions, Collection, CollectionDetails, Creators, GasLessMintOptions, MintCollectionOptions, Option, RegularNftMetadata, ThawOptions, TransferOptions, Uses }; diff --git a/packages/types/dist/regular-nft.js b/packages/types/dist/regular-nft.js index d34bb323f..0e8b7d2ff 100644 --- a/packages/types/dist/regular-nft.js +++ b/packages/types/dist/regular-nft.js @@ -35,4 +35,4 @@ var UseMethod = /* @__PURE__ */ ((UseMethod2) => { 0 && (module.exports = { UseMethod }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL3JlZ3VsYXItbmZ0L2luZGV4LnRzIiwgIi4uL3NyYy9yZWd1bGFyLW5mdC9jb21tb24udHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImV4cG9ydCAqIGZyb20gJy4vY29tbW9uJztcbmV4cG9ydCAqIGZyb20gJy4vZ2FzLWxlc3MtbWludCc7XG5leHBvcnQgKiBmcm9tICcuL2ZpbmQnO1xuZXhwb3J0ICogZnJvbSAnLi9taW50JztcbmV4cG9ydCAqIGZyb20gJy4vbWludC1jb2xsZWN0aW9uJztcbiIsICJpbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJy4uL2FjY291bnQnO1xuaW1wb3J0IEJOIGZyb20gJ2JuLmpzJztcblxuZXhwb3J0IHR5cGUgYmlnbnVtID0gbnVtYmVyIHwgQk47XG5cbmV4cG9ydCB0eXBlIE9wdGlvbjxUPiA9IFQgfCBudWxsO1xuXG5leHBvcnQgZW51bSBVc2VNZXRob2Qge1xuICBCdXJuID0gMCxcbiAgTXVsdGlwbGUgPSAxLFxuICBTaW5nbGUgPSAyLFxufVxuXG5leHBvcnQgdHlwZSBVc2VzID0ge1xuICB1c2VNZXRob2Q6IFVzZU1ldGhvZDtcbiAgcmVtYWluaW5nOiBiaWdudW07XG4gIHRvdGFsOiBiaWdudW07XG59O1xuXG5leHBvcnQgdHlwZSBDcmVhdG9ycyA9IHtcbiAgYWRkcmVzczogUHVia2V5O1xuICBzaGFyZTogbnVtYmVyO1xuICB2ZXJpZmllZDogYm9vbGVhbjtcbn07XG5cbmV4cG9ydCB0eXBlIElucHV0Q3JlYXRvcnMgPSB7XG4gIGFkZHJlc3M6IFB1YmtleTtcbiAgc2VjcmV0OiBTZWNyZXQ7XG4gIHNoYXJlOiBudW1iZXI7XG59O1xuIl0sCiAgIm1hcHBpbmdzIjogIjs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBOzs7QUNPTyxJQUFLLFlBQUwsa0JBQUtBLGVBQUw7QUFDTCxFQUFBQSxzQkFBQSxVQUFPLEtBQVA7QUFDQSxFQUFBQSxzQkFBQSxjQUFXLEtBQVg7QUFDQSxFQUFBQSxzQkFBQSxZQUFTLEtBQVQ7QUFIVSxTQUFBQTtBQUFBLEdBQUE7IiwKICAibmFtZXMiOiBbIlVzZU1ldGhvZCJdCn0K \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL3JlZ3VsYXItbmZ0L2luZGV4LnRzIiwgIi4uL3NyYy9yZWd1bGFyLW5mdC9jb21tb24udHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImV4cG9ydCAqIGZyb20gJy4vYnVybic7XG5leHBvcnQgKiBmcm9tICcuL2NvbW1vbic7XG5leHBvcnQgKiBmcm9tICcuL2dhcy1sZXNzLW1pbnQnO1xuZXhwb3J0ICogZnJvbSAnLi9maW5kJztcbmV4cG9ydCAqIGZyb20gJy4vbWludCc7XG5leHBvcnQgKiBmcm9tICcuL21pbnQtY29sbGVjdGlvbic7XG5leHBvcnQgKiBmcm9tICcuL3RoYXcnO1xuZXhwb3J0ICogZnJvbSAnLi90cmFuc2Zlcic7XG4iLCAiaW1wb3J0IHsgUHVia2V5LCBTZWNyZXQgfSBmcm9tICcuLi9hY2NvdW50JztcbmltcG9ydCBCTiBmcm9tICdibi5qcyc7XG5cbmV4cG9ydCB0eXBlIGJpZ251bSA9IG51bWJlciB8IEJOO1xuXG5leHBvcnQgdHlwZSBPcHRpb248VD4gPSBUIHwgbnVsbDtcblxuZXhwb3J0IGVudW0gVXNlTWV0aG9kIHtcbiAgQnVybiA9IDAsXG4gIE11bHRpcGxlID0gMSxcbiAgU2luZ2xlID0gMixcbn1cblxuZXhwb3J0IHR5cGUgVXNlcyA9IHtcbiAgdXNlTWV0aG9kOiBVc2VNZXRob2Q7XG4gIHJlbWFpbmluZzogYmlnbnVtO1xuICB0b3RhbDogYmlnbnVtO1xufTtcblxuZXhwb3J0IHR5cGUgQ3JlYXRvcnMgPSB7XG4gIGFkZHJlc3M6IFB1YmtleTtcbiAgc2hhcmU6IG51bWJlcjtcbiAgdmVyaWZpZWQ6IGJvb2xlYW47XG59O1xuXG5leHBvcnQgdHlwZSBJbnB1dENyZWF0b3JzID0ge1xuICBhZGRyZXNzOiBQdWJrZXk7XG4gIHNlY3JldDogU2VjcmV0O1xuICBzaGFyZTogbnVtYmVyO1xufTtcbiJdLAogICJtYXBwaW5ncyI6ICI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTs7O0FDT08sSUFBSyxZQUFMLGtCQUFLQSxlQUFMO0FBQ0wsRUFBQUEsc0JBQUEsVUFBTyxLQUFQO0FBQ0EsRUFBQUEsc0JBQUEsY0FBVyxLQUFYO0FBQ0EsRUFBQUEsc0JBQUEsWUFBUyxLQUFUO0FBSFUsU0FBQUE7QUFBQSxHQUFBOyIsCiAgIm5hbWVzIjogWyJVc2VNZXRob2QiXQp9Cg== \ No newline at end of file diff --git a/packages/types/dist/spl-token.d.mts b/packages/types/dist/spl-token.d.mts index f70eefce3..ec6fb174b 100644 --- a/packages/types/dist/spl-token.d.mts +++ b/packages/types/dist/spl-token.d.mts @@ -1,6 +1,6 @@ import { Secret, Pubkey } from './account.mjs'; import { Offchain, Attribute, FileType, StorageType } from './storage.mjs'; -import { C as Creators, U as Uses, I as InputCreators, d as Options } from './mint-a48f3fac.js'; +import { C as Creators, U as Uses, I as InputCreators, O as Options } from './mint-74b505a0.js'; import '@solana/web3.js'; import './phantom-e9a40784.js'; import './das-api.mjs'; diff --git a/packages/types/dist/spl-token.d.ts b/packages/types/dist/spl-token.d.ts index 68395808a..b4b87c8b6 100644 --- a/packages/types/dist/spl-token.d.ts +++ b/packages/types/dist/spl-token.d.ts @@ -1,6 +1,6 @@ import { Secret, Pubkey } from './account.js'; import { Offchain, Attribute, FileType, StorageType } from './storage.js'; -import { C as Creators, U as Uses, I as InputCreators, d as Options } from './mint-8edd0151.js'; +import { C as Creators, U as Uses, I as InputCreators, O as Options } from './mint-08f26d69.js'; import '@solana/web3.js'; import './phantom-e9a40784.js'; import './das-api.js'; diff --git a/packages/types/src/regular-nft/burn.ts b/packages/types/src/regular-nft/burn.ts new file mode 100644 index 000000000..c51880e5e --- /dev/null +++ b/packages/types/src/regular-nft/burn.ts @@ -0,0 +1,5 @@ +import { Secret } from '../account'; + +export type BurnOptions = { + feePayer: Secret; +}; diff --git a/packages/types/src/regular-nft/index.ts b/packages/types/src/regular-nft/index.ts index 3e9bd9a20..8d00d0fdf 100644 --- a/packages/types/src/regular-nft/index.ts +++ b/packages/types/src/regular-nft/index.ts @@ -1,5 +1,8 @@ +export * from './burn'; export * from './common'; export * from './gas-less-mint'; export * from './find'; export * from './mint'; export * from './mint-collection'; +export * from './thaw'; +export * from './transfer'; diff --git a/packages/types/src/regular-nft/thaw.ts b/packages/types/src/regular-nft/thaw.ts new file mode 100644 index 000000000..18fe3be06 --- /dev/null +++ b/packages/types/src/regular-nft/thaw.ts @@ -0,0 +1,5 @@ +import { Secret } from '../account'; + +export type ThawOptions = { + feePayer: Secret; +}; diff --git a/packages/types/src/regular-nft/transfer.ts b/packages/types/src/regular-nft/transfer.ts new file mode 100644 index 000000000..9f012e497 --- /dev/null +++ b/packages/types/src/regular-nft/transfer.ts @@ -0,0 +1,5 @@ +import { Secret } from '../account'; + +export type TransferOptions = { + feePayer: Secret; +};