diff --git a/examples/integration1-metaplex-nft.ts b/examples/integration1-metaplex-nft.ts index 6d602a46a..2601d67e7 100644 --- a/examples/integration1-metaplex-nft.ts +++ b/examples/integration1-metaplex-nft.ts @@ -3,9 +3,9 @@ ////////////////////////////////////////////// import assert from 'assert'; -import { Airdrop, KeypairStr, Pubkey } from '@solana-suite/core'; +import { Airdrop } from '@solana-suite/core'; import { Metaplex } from '@solana-suite/nft'; -import { Node } from '@solana-suite/shared'; +import { Node, KeypairAccount, Pubkey } from '@solana-suite/shared'; import { RandomAsset } from '../packages/storage/test/randomAsset'; import { requestTransferByKeypair } from './requestTransferByKeypair'; @@ -15,15 +15,15 @@ import { requestTransferByKeypair } from './requestTransferByKeypair'; ////////////////////////////////////////////// // create nft owner wallet. - const owner = KeypairStr.create(); - const receipt = KeypairStr.create(); - const feePayer = KeypairStr.create(); + const owner = KeypairAccount.create(); + const receipt = KeypairAccount.create(); + const feePayer = KeypairAccount.create(); - // faucet + // faucet if (process.env.AIR_DROP) { - await Airdrop.request(feePayer.toPublicKey()); + await Airdrop.request(feePayer.pubkey); } else { - await requestTransferByKeypair(feePayer.toPublicKey()); + await requestTransferByKeypair(feePayer.pubkey); } console.log('# owner: ', owner.pubkey); @@ -49,8 +49,8 @@ import { requestTransferByKeypair } from './requestTransferByKeypair'; isMutable: true, external_url: 'https://github.com/atonoy/solana-suite', }, - owner.toKeypair(), - feePayer.toKeypair() + owner.secret, + feePayer.secret ); // this is NFT ID @@ -66,7 +66,7 @@ import { requestTransferByKeypair } from './requestTransferByKeypair'; // Display metadata from blockchain(optional) ////////////////////////////////////////////// - const metadata = await Metaplex.findByOwner(owner.toPublicKey()); + const metadata = await Metaplex.findByOwner(owner.pubkey); metadata.match( (value) => console.log('# metadata: ', value), @@ -79,11 +79,11 @@ import { requestTransferByKeypair } from './requestTransferByKeypair'; //transfer nft owner => receipt const inst2 = await Metaplex.transfer( - mint.toPublicKey(), - owner.toPublicKey(), - receipt.toPublicKey(), - [owner.toKeypair()], - feePayer.toKeypair() + mint, + owner.pubkey, + receipt.pubkey, + [owner.secret], + feePayer.secret ); // submit instructions diff --git a/examples/integration2-transaction-history.ts b/examples/integration2-transaction-history.ts index 578f9f3b1..829e96e7d 100644 --- a/examples/integration2-transaction-history.ts +++ b/examples/integration2-transaction-history.ts @@ -3,15 +3,9 @@ ////////////////////////////////////////////// import assert from 'assert'; -import { - SplToken, - Pubkey, - KeypairStr, - Airdrop, - DirectionFilter, -} from '@solana-suite/core'; +import { SplToken, Airdrop, DirectionFilter } from '@solana-suite/core'; -import { Node } from '@solana-suite/shared'; +import { Node, Pubkey, KeypairAccount } from '@solana-suite/shared'; import { requestTransferByKeypair } from './requestTransferByKeypair'; import { RandomAsset } from '@solana-suite/storage/test/randomAsset'; import { StorageType } from '@solana-suite/shared-metaplex'; @@ -22,14 +16,14 @@ import { StorageType } from '@solana-suite/shared-metaplex'; ////////////////////////////////////////////// // create token owner wallet, receive token receipt wallet. - const owner = KeypairStr.create(); - const receipt = KeypairStr.create(); + const owner = KeypairAccount.create(); + const receipt = KeypairAccount.create(); // faucet if (process.env.AIR_DROP) { - await Airdrop.request(owner.toPublicKey()); + await Airdrop.request(owner.pubkey); } else { - await requestTransferByKeypair(owner.toPublicKey()); + await requestTransferByKeypair(owner.pubkey); } console.log('# owner: ', owner); @@ -51,8 +45,8 @@ import { StorageType } from '@solana-suite/shared-metaplex'; isMutable: false, }; const inst1 = await SplToken.mint( - owner.toPublicKey(), - owner.toKeypair(), + owner.pubkey, + owner.secret, totalAmount, decimals, tokenMetadata @@ -74,10 +68,10 @@ import { StorageType } from '@solana-suite/shared-metaplex'; // transfer nft to receipt wallet const inst2 = await SplToken.transfer( - mint.toPublicKey(), - owner.toPublicKey(), - receipt.toPublicKey(), - [owner.toKeypair()], + mint, + owner.pubkey, + receipt.pubkey, + [owner.secret], 10, decimals ); @@ -95,18 +89,14 @@ import { StorageType } from '@solana-suite/shared-metaplex'; ////////////////////////////////////////////// const hist1 = await SplToken.getHistory( - mint.toPublicKey(), // used mint - owner.toPublicKey() // search key + mint, // used mint + owner.pubkey // search key ); console.log('# token history by publish: ', hist1.unwrap()); - const hist2 = await SplToken.getHistory( - mint.toPublicKey(), - receipt.toPublicKey(), - { - directionFilter: DirectionFilter.Dest, // Dest or Source - } - ); + const hist2 = await SplToken.getHistory(mint, receipt.pubkey, { + directionFilter: DirectionFilter.Dest, // Dest or Source + }); console.log( '# token history result by destination filter : ', hist2.unwrap() diff --git a/examples/integration3-handling-response.ts b/examples/integration3-handling-response.ts index 5485724d1..0d66dd3cb 100644 --- a/examples/integration3-handling-response.ts +++ b/examples/integration3-handling-response.ts @@ -17,7 +17,7 @@ const DEMO_ADDRESS = 'AorMYhBGmqo8Czp65WLjA42vKaQ5jS69gxyk6KxAsK3x'; ////////////////////////////////////////////// // Example1 type guard ////////////////////////////////////////////// - const ex1 = await SolNative.findByOwner(DEMO_ADDRESS.toPublicKey()); + const ex1 = await SolNative.findByOwner(DEMO_ADDRESS); ex1.isOk && console.log('# ex1: ', ex1.value); if (ex1.isOk) { @@ -29,14 +29,14 @@ const DEMO_ADDRESS = 'AorMYhBGmqo8Czp65WLjA42vKaQ5jS69gxyk6KxAsK3x'; ////////////////////////////////////////////// // Example2 unwrap ////////////////////////////////////////////// - const ex2 = await SolNative.findByOwner(DEMO_ADDRESS.toPublicKey()); + const ex2 = await SolNative.findByOwner(DEMO_ADDRESS); console.log('# ex2: ', ex2.unwrap()); ////////////////////////////////////////////// // Example3 map() ////////////////////////////////////////////// - const ex4 = await SolNative.findByOwner(DEMO_ADDRESS.toPublicKey()); + const ex4 = await SolNative.findByOwner(DEMO_ADDRESS); const mapped = ex4.map( (value: SolNativeOwnerInfo) => value.sol * 100, @@ -48,7 +48,7 @@ const DEMO_ADDRESS = 'AorMYhBGmqo8Czp65WLjA42vKaQ5jS69gxyk6KxAsK3x'; ////////////////////////////////////////////// // Example4 match() ////////////////////////////////////////////// - const ex5 = await SolNative.findByOwner(DEMO_ADDRESS.toPublicKey()); + const ex5 = await SolNative.findByOwner(DEMO_ADDRESS); ex5.match( (value: SolNativeOwnerInfo) => console.log('# ex5: ', value), diff --git a/examples/integration4-multisig.ts b/examples/integration4-multisig.ts index 56c103085..d64635907 100644 --- a/examples/integration4-multisig.ts +++ b/examples/integration4-multisig.ts @@ -3,9 +3,9 @@ ////////////////////////////////////////////// import assert from 'assert'; -import { KeypairStr, Multisig, Pubkey, Airdrop } from '@solana-suite/core'; +import { Multisig, Airdrop } from '@solana-suite/core'; -import { Node } from '@solana-suite/shared'; +import { Node, KeypairAccount, Pubkey } from '@solana-suite/shared'; import { requestTransferByKeypair } from './requestTransferByKeypair'; (async () => { @@ -19,18 +19,18 @@ import { requestTransferByKeypair } from './requestTransferByKeypair'; // publisher: mint token, transfer token and pay transaction fee account // receipt: generally user account. sol not stocked - const feePayer = KeypairStr.create(); + const feePayer = KeypairAccount.create(); // signer for multisig - const signer1 = KeypairStr.create(); - const signer2 = KeypairStr.create(); - const signer3 = KeypairStr.create(); + const signer1 = KeypairAccount.create(); + const signer2 = KeypairAccount.create(); + const signer3 = KeypairAccount.create(); // faucet if (process.env.AIR_DROP) { - await Airdrop.request(feePayer.toPublicKey()); + await Airdrop.request(feePayer.pubkey); } else { - await requestTransferByKeypair(feePayer.toPublicKey(), 0.6); + await requestTransferByKeypair(feePayer.pubkey, 0.6); } console.log('# feePayer: ', feePayer.pubkey); @@ -41,13 +41,8 @@ import { requestTransferByKeypair } from './requestTransferByKeypair'; ////////////////////////////////////////////// // Setting multisig 2 of 2(m of n) ////////////////////////////////////////////// - const signerPubkeys = [ - signer1.toPublicKey(), - signer2.toPublicKey(), - signer3.toPublicKey(), - ]; - - const inst1 = await Multisig.create(2, feePayer.toKeypair(), signerPubkeys); + const signerPubkeys = [signer1.pubkey, signer2.pubkey, signer3.pubkey]; + const inst1 = await Multisig.create(2, feePayer.secret, signerPubkeys); const multisig = inst1.unwrap().data as Pubkey; (await inst1.submit()).match( async (value) => { diff --git a/examples/integration5-token-memo.ts b/examples/integration5-token-memo.ts index c469c581d..5ee960036 100644 --- a/examples/integration5-token-memo.ts +++ b/examples/integration5-token-memo.ts @@ -3,15 +3,9 @@ ////////////////////////////////////////////// import assert from 'assert'; -import { - KeypairStr, - SplToken, - Pubkey, - Memo, - Airdrop, -} from '@solana-suite/core'; - -import { Node } from '@solana-suite/shared'; +import { SplToken, Memo, Airdrop } from '@solana-suite/core'; + +import { Node, Pubkey, KeypairAccount } from '@solana-suite/shared'; import { requestTransferByKeypair } from './requestTransferByKeypair'; import { RandomAsset } from '@solana-suite/storage/test/randomAsset'; import { StorageType } from '@solana-suite/shared-metaplex'; @@ -22,14 +16,14 @@ import { StorageType } from '@solana-suite/shared-metaplex'; ////////////////////////////////////////////// // create token owner wallet, receive token receipt wallet. - const owner = KeypairStr.create(); - const receipt = KeypairStr.create(); + const owner = KeypairAccount.create(); + const receipt = KeypairAccount.create(); // faucet if (process.env.AIR_DROP) { - await Airdrop.request(owner.toPublicKey()); + await Airdrop.request(owner.pubkey); } else { - await requestTransferByKeypair(owner.toPublicKey()); + await requestTransferByKeypair(owner.pubkey); } console.log('# owner: ', owner.pubkey); @@ -52,8 +46,8 @@ import { StorageType } from '@solana-suite/shared-metaplex'; }; const inst1 = await SplToken.mint( - owner.toPublicKey(), - owner.toKeypair(), + owner.pubkey, + owner.secret, totalAmount, decimals, tokenMetadata @@ -76,8 +70,8 @@ import { StorageType } from '@solana-suite/shared-metaplex'; `; const inst2 = Memo.create( memoData, - receipt.toPublicKey(), // memo's owner - owner.toKeypair() // signer or feePayer + receipt.pubkey, // memo's owner + owner.secret // signer or feePayer ); ////////////////////////////////////////////// @@ -86,10 +80,10 @@ import { StorageType } from '@solana-suite/shared-metaplex'; // transfer nft to receipt wallet const inst3 = await SplToken.transfer( - mint.toPublicKey(), - owner.toPublicKey(), - receipt.toPublicKey(), - [owner.toKeypair()], + mint, + owner.pubkey, + receipt.pubkey, + [owner.secret], 10, decimals ); @@ -106,10 +100,7 @@ import { StorageType } from '@solana-suite/shared-metaplex'; // GET MEMO DATA ////////////////////////////////////////////// - const res = await SplToken.getHistory( - mint.toPublicKey(), - receipt.toPublicKey() - ); + const res = await SplToken.getHistory(mint, receipt.pubkey); res.isOk && console.log('# Transfer Memo: ', res.value[0].memo); })(); diff --git a/examples/integration7-transfer-to-users.ts b/examples/integration7-transfer-to-users.ts index 342165373..bc4e4b1ba 100644 --- a/examples/integration7-transfer-to-users.ts +++ b/examples/integration7-transfer-to-users.ts @@ -3,17 +3,14 @@ ////////////////////////////////////////////// import assert from 'assert'; -import { - KeypairStr, - Airdrop, - Pubkey, - SplToken, - Secret, -} from '@solana-suite/core'; +import { Airdrop, SplToken } from '@solana-suite/core'; import { // Node, // Constants, + KeypairAccount, + Pubkey, + Secret, sleep, } from '@solana-suite/shared'; import { requestTransferByKeypair } from './requestTransferByKeypair'; @@ -35,7 +32,7 @@ const SLEEP_TIME_WAIT = 0; let users: { pubkey: Pubkey; secret: Secret }[] = []; for (let i = 0; i < USERS_COUNT; i++) { - users.push(KeypairStr.create()); + users.push(KeypairAccount.create()); } // manual setting @@ -45,13 +42,13 @@ const SLEEP_TIME_WAIT = 0; // ); // random create - const owner = KeypairStr.create(); + const owner = KeypairAccount.create(); // faucet if (process.env.AIR_DROP) { - await Airdrop.request(owner.toPublicKey()); + await Airdrop.request(owner.pubkey); } else { - await requestTransferByKeypair(owner.toPublicKey()); + await requestTransferByKeypair(owner.pubkey); } console.log('# owner: ', owner.pubkey); @@ -72,8 +69,8 @@ const SLEEP_TIME_WAIT = 0; }; const inst1 = await SplToken.mint( - owner.toPublicKey(), - owner.toKeypair(), + owner.pubkey, + owner.secret, totalAmount, decimals, tokenMetadata @@ -96,10 +93,10 @@ const SLEEP_TIME_WAIT = 0; for (const user of users) { await sleep(SLEEP_TIME_WAIT); const inst2 = await SplToken.transfer( - mint.toPublicKey(), - owner.toPublicKey(), - user.pubkey.toPublicKey(), - [owner.toKeypair()], + mint, + owner.pubkey, + user.pubkey, + [owner.secret], 10, decimals ); diff --git a/examples/integration8-feepayer-partial-sign-transfer.ts b/examples/integration8-feepayer-partial-sign-transfer.ts index 5d42aa1c9..cd608a5b7 100644 --- a/examples/integration8-feepayer-partial-sign-transfer.ts +++ b/examples/integration8-feepayer-partial-sign-transfer.ts @@ -3,9 +3,14 @@ ////////////////////////////////////////////// import assert from 'assert'; -import { Airdrop, KeypairStr, SolNative, SplToken } from '@solana-suite/core'; - -import { PartialSignInstruction, sleep } from '@solana-suite/shared'; +import { Airdrop, SolNative, SplToken } from '@solana-suite/core'; + +import { + PartialSignInstruction, + sleep, + KeypairAccount, + Pubkey, +} from '@solana-suite/shared'; import { requestTransferByKeypair } from './requestTransferByKeypair'; import { RandomAsset } from '@solana-suite/storage/test/randomAsset'; import { StorageType } from '@solana-suite/shared-metaplex'; @@ -15,29 +20,28 @@ import { StorageType } from '@solana-suite/shared-metaplex'; ////////////////////////////////////////////// // random create - const owner = KeypairStr.create(); - const tokenOwner = KeypairStr.create(); - const dest = KeypairStr.create(); - const feePayer = KeypairStr.create(); + const owner = KeypairAccount.create(); + const tokenOwner = KeypairAccount.create(); + const dest = KeypairAccount.create(); + const feePayer = KeypairAccount.create(); // faucet if (process.env.AIR_DROP) { - await Airdrop.request(owner.toPublicKey()); - await Airdrop.request(feePayer.toPublicKey()); + await Airdrop.request(owner.pubkey); + await Airdrop.request(feePayer.pubkey); } else { - await requestTransferByKeypair(owner.toPublicKey()); - await requestTransferByKeypair(feePayer.toPublicKey()); + await requestTransferByKeypair(owner.pubkey); + await requestTransferByKeypair(feePayer.pubkey); } console.log('# owner: ', owner.pubkey); await sleep(10); // Avoid 429 error - await Airdrop.request(feePayer.toPublicKey()); - console.log('# feePayer: ', feePayer.pubkey); - - console.log('# tokenOwner: ', tokenOwner.pubkey); - console.log('# dest: ', dest.pubkey); + await Airdrop.request(feePayer.pubkey); + console.log('# feePayer: ', feePayer); + console.log('# tokenOwner: ', tokenOwner); + console.log('# dest: ', dest); // SOL version // ////////////////////////////////////////////// @@ -45,11 +49,11 @@ import { StorageType } from '@solana-suite/shared-metaplex'; ////////////////////////////////////////////// const inst = await SolNative.feePayerPartialSignTransfer( - owner.toPublicKey(), - dest.toPublicKey(), - [owner.toKeypair()], + owner.pubkey, + dest.pubkey, + [owner.secret], 0.001, - feePayer.toPublicKey() + feePayer.pubkey ); let hex: string = ''; @@ -70,7 +74,7 @@ import { StorageType } from '@solana-suite/shared-metaplex'; ////////////////////////////////////////////// const obj = new PartialSignInstruction(hex); - const res = await obj.submit(feePayer.toKeypair()); + const res = await obj.submit(feePayer.secret); res.match( (ok) => console.log('# tx signature: ', ok), (err) => assert.fail(err.message) @@ -91,24 +95,24 @@ import { StorageType } from '@solana-suite/shared-metaplex'; }; const mintInst = await SplToken.mint( - tokenOwner.toPublicKey(), - tokenOwner.toKeypair(), + tokenOwner.pubkey, + tokenOwner.secret, 10000, decimals, tokenMetadata, - feePayer.toKeypair() + feePayer.secret ); await mintInst.submit(); const inst2 = await SplToken.feePayerPartialSignTransfer( - (mintInst.unwrap().data as string).toPublicKey(), - tokenOwner.toPublicKey(), - dest.toPublicKey(), - [tokenOwner.toKeypair()], + mintInst.unwrap().data as Pubkey, + tokenOwner.pubkey, + dest.pubkey, + [tokenOwner.secret], 100, decimals, - feePayer.toPublicKey() + feePayer.pubkey ); let hex2: string = ''; @@ -129,7 +133,7 @@ import { StorageType } from '@solana-suite/shared-metaplex'; ////////////////////////////////////////////// const obj2 = new PartialSignInstruction(hex2); - const res2 = await obj2.submit(feePayer.toKeypair()); + const res2 = await obj2.submit(feePayer.secret); res2.match( (ok) => console.log('# tx signature: ', ok), (err) => assert.fail(err.message) diff --git a/examples/requestTransferByKeypair.ts b/examples/requestTransferByKeypair.ts index 243344c0e..10cdd4ff0 100644 --- a/examples/requestTransferByKeypair.ts +++ b/examples/requestTransferByKeypair.ts @@ -1,6 +1,6 @@ import { SolNative } from '@solana-suite/core'; +import { Pubkey, Secret } from '@solana-suite/shared'; import { Node } from '@solana-suite/shared/src'; -import { PublicKey } from '@solana/web3.js'; import assert from 'assert'; import fs from 'fs'; @@ -15,19 +15,14 @@ import fs from 'fs'; const LOCAL_KEYPAIR_FILE = './solana-localhost-devnet-keypair'; export const requestTransferByKeypair = async ( - pubkey: PublicKey, + pubkey: Pubkey, sol: number = 0.1 ) => { - console.log('Now transfer...please wait'); - const keypair: { pubkey: string; secret: string } = JSON.parse( + console.log('Now load...please wait'); + const keypair: { pubkey: Pubkey; secret: Secret } = JSON.parse( fs.readFileSync(LOCAL_KEYPAIR_FILE, 'utf8') ).source; - const sig = SolNative.transfer( - keypair.pubkey.toPublicKey(), - pubkey, - [keypair.secret.toKeypair()], - sol - ); + const sig = SolNative.transfer(keypair.pubkey, pubkey, [keypair.secret], sol); (await sig.submit()).match( (ok) => { diff --git a/packages/core/dist/cjs/associated-account.js b/packages/core/dist/cjs/associated-account.js index b62613720..ce7521a7f 100644 --- a/packages/core/dist/cjs/associated-account.js +++ b/packages/core/dist/cjs/associated-account.js @@ -27,7 +27,7 @@ var AssociatedAccount; const RETRY_OVER_LIMIT = 10; const RETRY_SLEEP_TIME = 3; const get = (mint, owner, feePayer, allowOwnerOffCurve = false) => __awaiter(this, void 0, void 0, function* () { - const res = yield AssociatedAccount.makeOrCreateInstruction(mint, owner, new shared_1.KeyPair({ secret: feePayer }).pubkey, allowOwnerOffCurve); + const res = yield AssociatedAccount.makeOrCreateInstruction(mint, owner, new shared_1.KeypairAccount({ secret: feePayer }).pubkey, allowOwnerOffCurve); if (!res.inst) { return res.tokenAccount; } diff --git a/packages/core/dist/cjs/associated-account.js.map b/packages/core/dist/cjs/associated-account.js.map index 848b3f1b6..fc0c18fd0 100644 --- a/packages/core/dist/cjs/associated-account.js.map +++ b/packages/core/dist/cjs/associated-account.js.map @@ -1 +1 @@ -{"version":3,"file":"associated-account.js","sourceRoot":"","sources":["../../src/associated-account.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,iDAQ8B;AAC9B,iDAQ2B;AAE3B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AK,YAAY,yCAA6B,CAAC,EACjD;gBACA,MAAM,KAAK,CAAC,kBAAkB,CAAC,CAAC;aACjC;YAED,MAAM,KAAK,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC;YAE3C,MAAM,IAAI,GAAG,IAAA,mDAAuC,EAClD,KAAK,CAAC,WAAW,EAAE,EACnB,sBAAsB,EACtB,KAAK,CAAC,WAAW,EAAE,EACnB,IAAI,CAAC,WAAW,EAAE,EAClB,4BAAgB,EAChB,uCAA2B,CAC5B,CAAC;YAEF,OAAO;gBACL,YAAY,EAAE,sBAAsB,CAAC,QAAQ,EAAE;gBAC/C,IAAI;aACL,CAAC;SACH;IACH,CAAC,CAAA,CAAC;AACJ,CAAC,EAvIgB,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAuIjC"} \ No newline at end of file +{"version":3,"file":"associated-account.js","sourceRoot":"","sources":["../../src/associated-account.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,iDAQ8B;AAC9B,iDAQ2B;AAE3B;;;;;;;;;GASG;AACH,IAAiB,iBAAiB,CAuIjC;AAvID,WAAiB,iBAAiB;IAChC,MAAM,gBAAgB,GAAG,EAAE,CAAC;IAC5B,MAAM,gBAAgB,GAAG,CAAC,CAAC;IAC3B,MAAM,GAAG,GAAG,CACV,IAAY,EACZ,KAAa,EACb,QAAgB,EAChB,kBAAkB,GAAG,KAAK,EACK,EAAE;QACjC,MAAM,GAAG,GAAG,MAAM,kBAAA,uBAAuB,CACvC,IAAI,EACJ,KAAK,EACL,IAAI,uBAAc,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAC/C,kBAAkB,CACnB,CAAC;QAEF,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE;YACb,OAAO,GAAG,CAAC,YAAY,CAAC;SACzB;QAED,OAAO,IAAI,oBAAW,CACpB,CAAC,GAAG,CAAC,IAAI,CAAC,EACV,EAAE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ist/esm/associated-account.js b/packages/core/dist/esm/associated-account.js index 8b7560b8e..a5bfe32bf 100644 --- a/packages/core/dist/esm/associated-account.js +++ b/packages/core/dist/esm/associated-account.js @@ -7,7 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -import { Node, debugLog, Instruction, sleep, KeyPair, } from '@solana-suite/shared'; +import { Node, debugLog, Instruction, sleep, KeypairAccount, } from '@solana-suite/shared'; import { ASSOCIATED_TOKEN_PROGRAM_ID, TOKEN_PROGRAM_ID, getAssociatedTokenAddress, getAccount, TokenAccountNotFoundError, TokenInvalidAccountOwnerError, createAssociatedTokenAccountInstruction, } from '@solana/spl-token'; /** * Get Associated token Account. @@ -24,7 +24,7 @@ export var AssociatedAccount; const RETRY_OVER_LIMIT = 10; const RETRY_SLEEP_TIME = 3; const get = (mint, owner, feePayer, allowOwnerOffCurve = false) => __awaiter(this, void 0, void 0, function* () { - const res = yield AssociatedAccount.makeOrCreateInstruction(mint, owner, new KeyPair({ secret: feePayer }).pubkey, allowOwnerOffCurve); + const res = yield AssociatedAccount.makeOrCreateInstruction(mint, owner, new KeypairAccount({ secret: feePayer }).pubkey, allowOwnerOffCurve); if (!res.inst) { return res.tokenAccount; } diff --git a/packages/core/dist/esm/associated-account.js.map b/packages/core/dist/esm/associated-account.js.map index 9982746fa..b09ba141c 100644 --- a/packages/core/dist/esm/associated-account.js.map +++ b/packages/core/dist/esm/associated-account.js.map @@ -1 +1 @@ -{"version":3,"file":"associated-account.js","sourceRoot":"","sources":["../../src/associated-account.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EACL,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,KAAK,EAGL,OAAO,GACR,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,2BAA2B,EAC3B,gBAAgB,EAChB,yBAAyB,EACzB,UAAU,EACV,yBAAyB,EACzB,6BAA6B,EAC7B,uCAAuC,GACxC,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AC,EACjD;gBACA,MAAM,KAAK,CAAC,kBAAkB,CAAC,CAAC;aACjC;YAED,MAAM,KAAK,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC;YAE3C,MAAM,IAAI,GAAG,uCAAuC,CAClD,KAAK,CAAC,WAAW,EAAE,EACnB,sBAAsB,EACtB,KAAK,CAAC,WAAW,EAAE,EACnB,IAAI,CAAC,WAAW,EAAE,EAClB,gBAAgB,EAChB,2BAA2B,CAC5B,CAAC;YAEF,OAAO;gBACL,YAAY,EAAE,sBAAsB,CAAC,QAAQ,EAAE;gBAC/C,IAAI;aACL,CAAC;SACH;IACH,CAAC,CAAA,CAAC;AACJ,CAAC,EAvIgB,iBAAiB,KAAjB,iBAAiB,QAuIjC"} \ No newline at end of file +{"version":3,"file":"associated-account.js","sourceRoot":"","sources":["../../src/associated-account.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EACL,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,KAAK,EAGL,cAAc,GACf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,2BAA2B,EAC3B,gBAAgB,EAChB,yBAAyB,EACzB,UAAU,EACV,yBAAyB,EACzB,6BAA6B,EAC7B,uCAAuC,GACxC,MAAM,mBAAmB,CAAC;AAE3B;;;;;;;;;GASG;AACH,MAAM,KAAW,iBAAiB,CAuIjC;AAvID,WAAiB,iBAAiB;IAChC,MAAM,gBAAgB,GAAG,EAAE,CAAC;IAC5B,MAAM,gBAAgB,GAAG,CAAC,CAAC;IAC3B,MAAM,GAAG,GAAG,CACV,IAAY,EACZ,KAAa,EACb,QAAgB,EAChB,kBAAkB,GAAG,KAAK,EACK,EAAE;QACjC,MAAM,GAAG,GAAG,MAAM,kBAAA,uBAAuB,CACvC,IAAI,EACJ,KAAK,EACL,IAAI,cAAc,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAC/C,kBAAkB,CACnB,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,CAAC;AACJ,CAAC,EAvIgB,iBAAiB,KAAjB,iBAAiB,QAuIjC"} \ No newline at end of file diff --git a/packages/core/src/associated-account.ts b/packages/core/src/associated-account.ts index 7fa51fbd0..a4126f3d3 100644 --- a/packages/core/src/associated-account.ts +++ b/packages/core/src/associated-account.ts @@ -6,7 +6,7 @@ import { sleep, Pubkey, Secret, - KeyPair, + KeypairAccount, } from '@solana-suite/shared'; import { ASSOCIATED_TOKEN_PROGRAM_ID, @@ -40,7 +40,7 @@ export namespace AssociatedAccount { const res = await makeOrCreateInstruction( mint, owner, - new KeyPair({ secret: feePayer }).pubkey, + new KeypairAccount({ secret: feePayer }).pubkey, allowOwnerOffCurve ); diff --git a/packages/core/test/airdrop.test.ts b/packages/core/test/airdrop.test.ts index 70b22cc2c..ab6a6b2a1 100644 --- a/packages/core/test/airdrop.test.ts +++ b/packages/core/test/airdrop.test.ts @@ -3,9 +3,9 @@ import { assert } from 'chai'; import { Setup } from '../../shared/test/testSetup'; import { Airdrop } from '../src/airdrop'; import { SolNative } from '../src/'; -import { KeyPair } from '../../shared'; +import { KeypairAccount } from '../../shared'; -let source: KeyPair; +let source: KeypairAccount; describe.skip('Airdrop', () => { before(async () => { diff --git a/packages/core/test/associated-account.test.ts b/packages/core/test/associated-account.test.ts index f1a0b10a9..1c4c5a55c 100644 --- a/packages/core/test/associated-account.test.ts +++ b/packages/core/test/associated-account.test.ts @@ -5,9 +5,9 @@ import { SplToken } from '../src'; import { Setup } from '../../shared/test/testSetup'; import { RandomAsset } from '../../storage/test/randomAsset'; import { StorageType } from '../../shared-metaplex'; -import { KeyPair } from '../../shared'; +import { KeypairAccount } from '../../shared/src/keypair-account'; -let source: KeyPair; +let source: KeypairAccount; const TOKEN_METADATA = { name: 'solana-suite-token', symbol: 'SST', diff --git a/packages/core/test/memo.test.ts b/packages/core/test/memo.test.ts index 39251f2b4..47344490f 100644 --- a/packages/core/test/memo.test.ts +++ b/packages/core/test/memo.test.ts @@ -2,10 +2,10 @@ import { describe, it } from 'mocha'; import { assert } from 'chai'; import { Setup } from '../../shared/test/testSetup'; import { Memo, SolNative } from '../src'; -import { KeyPair } from '../../shared/src/key-pair'; +import { KeypairAccount } from '../../shared/src/keypair-account'; -let source: KeyPair; -let dest: KeyPair; +let source: KeypairAccount; +let dest: KeypairAccount; const DUMMY_DATA = 'dummy memo data'; describe('Memo', () => { diff --git a/packages/core/test/multisig.test.ts b/packages/core/test/multisig.test.ts index e454813ff..41694986f 100644 --- a/packages/core/test/multisig.test.ts +++ b/packages/core/test/multisig.test.ts @@ -1,9 +1,9 @@ import { assert } from 'chai'; import { Multisig } from '../src/'; import { Setup } from '../../shared/test/testSetup'; -import { KeyPair, Pubkey } from '../../shared'; +import { KeypairAccount, Pubkey } from '../../shared'; -let source: KeyPair; +let source: KeypairAccount; describe('Multisig', () => { before(async () => { @@ -12,8 +12,8 @@ describe('Multisig', () => { }); it('Is multisig address', async () => { - const signer1 = KeyPair.create(); - const signer2 = KeyPair.create(); + const signer1 = KeypairAccount.create(); + const signer2 = KeypairAccount.create(); const inst = await Multisig.create(2, source.secret, [ signer1.pubkey, signer2.pubkey, @@ -30,8 +30,8 @@ describe('Multisig', () => { }); it('[Err]Invalid multisig address', async () => { - const signer1 = KeyPair.create(); - const signer2 = KeyPair.create(); + const signer1 = KeypairAccount.create(); + const signer2 = KeypairAccount.create(); const inst = await Multisig.create(2, source.secret, [ signer1.pubkey, signer2.pubkey, @@ -44,8 +44,8 @@ describe('Multisig', () => { }); it('Create account 2 of 2', async () => { - const signer1 = KeyPair.create(); - const signer2 = KeyPair.create(); + const signer1 = KeypairAccount.create(); + const signer2 = KeypairAccount.create(); const inst = await Multisig.create(2, source.secret, [ signer1.pubkey, signer2.pubkey, @@ -58,9 +58,9 @@ describe('Multisig', () => { }); it('Create account 2 of 3', async () => { - const signer1 = KeyPair.create(); - const signer2 = KeyPair.create(); - const signer3 = KeyPair.create(); + const signer1 = KeypairAccount.create(); + const signer2 = KeypairAccount.create(); + const signer3 = KeypairAccount.create(); const inst = await Multisig.create(2, source.secret, [ signer1.pubkey, signer2.pubkey, @@ -74,14 +74,14 @@ describe('Multisig', () => { }); it('[Err] m number less than signers number', async () => { - const signer1 = KeyPair.create(); + const signer1 = KeypairAccount.create(); const res = await Multisig.create(2, source.secret, [signer1.pubkey]); assert.isTrue(res.isErr); }); it('Get multisig info', async () => { - const signer1 = KeyPair.create(); - const signer2 = KeyPair.create(); + const signer1 = KeypairAccount.create(); + const signer2 = KeypairAccount.create(); const inst = await Multisig.create(2, source.secret, [ signer1.pubkey, signer2.pubkey, diff --git a/packages/core/test/sol-native/fee-payer-partial-sign-transfer.test.ts b/packages/core/test/sol-native/fee-payer-partial-sign-transfer.test.ts index 1870de707..40216b966 100644 --- a/packages/core/test/sol-native/fee-payer-partial-sign-transfer.test.ts +++ b/packages/core/test/sol-native/fee-payer-partial-sign-transfer.test.ts @@ -1,11 +1,11 @@ import { describe, it, before } from 'mocha'; import { assert } from 'chai'; import { Setup } from '../../../shared/test/testSetup'; -import { KeyPair } from '../../../shared/src/key-pair'; +import { KeypairAccount } from '../../../shared/src/keypair-account'; import { SolNative } from '../../src/'; -let source: KeyPair; -let dest: KeyPair; +let source: KeypairAccount; +let dest: KeypairAccount; describe('SolNative', () => { before(async () => { diff --git a/packages/core/test/sol-native/transfer-with-multisig.test.ts b/packages/core/test/sol-native/transfer-with-multisig.test.ts index 7c2fd539b..fd0cba53f 100644 --- a/packages/core/test/sol-native/transfer-with-multisig.test.ts +++ b/packages/core/test/sol-native/transfer-with-multisig.test.ts @@ -2,10 +2,10 @@ import { describe, it, before } from 'mocha'; import { SolNative, Multisig } from '../../src'; import { assert } from 'chai'; import { Setup } from '../../../shared/test/testSetup'; -import { KeyPair } from '../../../shared/src'; +import { KeypairAccount } from '../../../shared/src/keypair-account'; -let source: KeyPair; -let dest: KeyPair; +let source: KeypairAccount; +let dest: KeypairAccount; describe('SolNative', () => { before(async () => { @@ -15,8 +15,8 @@ describe('SolNative', () => { }); it('transfer transaction with multi sig', async () => { - const signer1 = KeyPair.create(); - const signer2 = KeyPair.create(); + const signer1 = KeypairAccount.create(); + const signer2 = KeypairAccount.create(); const inst1 = await Multisig.create(2, source.secret, [ signer1.pubkey, signer2.pubkey, diff --git a/packages/core/test/sol-native/transfer.test.ts b/packages/core/test/sol-native/transfer.test.ts index 0d3355ce2..c1f5fd7c1 100644 --- a/packages/core/test/sol-native/transfer.test.ts +++ b/packages/core/test/sol-native/transfer.test.ts @@ -2,10 +2,10 @@ import { describe, it, before } from 'mocha'; import { SolNative, Airdrop } from '../../src'; import { assert } from 'chai'; import { Setup } from '../../../shared/test/testSetup'; -import { KeyPair } from '../../../shared/src'; +import { KeypairAccount } from '../../../shared/src/keypair-account'; -let source: KeyPair; -let dest: KeyPair; +let source: KeypairAccount; +let dest: KeypairAccount; describe('SolNative', () => { before(async () => { @@ -32,7 +32,7 @@ describe('SolNative', () => { // every call requestAirdrop(), raise internal error it.skip('transfer transaction with fee payer', async () => { const solAmount = 0.01; - const owner = KeyPair.create(); + const owner = KeypairAccount.create(); await Airdrop.request(owner.pubkey); const feePayer = source; diff --git a/packages/core/test/spl-token/add.test.ts b/packages/core/test/spl-token/add.test.ts index 74ee90185..34e24d009 100644 --- a/packages/core/test/spl-token/add.test.ts +++ b/packages/core/test/spl-token/add.test.ts @@ -4,9 +4,9 @@ import { Setup } from '../../../shared/test/testSetup'; import { SplToken } from '../../src/'; import { RandomAsset } from '../../../storage/test/randomAsset'; import { StorageType } from '../../../shared-metaplex/src'; -import { KeyPair, Pubkey } from '../../../shared/src/'; +import { KeypairAccount, Pubkey } from '../../../shared/src/'; -let source: KeyPair; +let source: KeypairAccount; let mint: Pubkey; const TOKEN_TOTAL_AMOUNT = 10000000; diff --git a/packages/core/test/spl-token/burn.test.ts b/packages/core/test/spl-token/burn.test.ts index 67e652a66..fa8ccd0f4 100644 --- a/packages/core/test/spl-token/burn.test.ts +++ b/packages/core/test/spl-token/burn.test.ts @@ -2,11 +2,11 @@ import { describe, it } from 'mocha'; import { assert } from 'chai'; import { Setup } from '../../../shared/test/testSetup'; import { SplToken } from '../../src/'; -import { Node, KeyPair } from '../../../shared'; +import { Node, KeypairAccount } from '../../../shared'; import { RandomAsset } from '../../../storage/test/randomAsset'; import { StorageType } from '../../../shared-metaplex'; -let source: KeyPair; +let source: KeypairAccount; const TOKEN_TOTAL_AMOUNT = 10000000; const MINT_DECIMAL = 2; diff --git a/packages/core/test/spl-token/fee-payer-partial-sign-transfer.test.ts b/packages/core/test/spl-token/fee-payer-partial-sign-transfer.test.ts index 4eaeca99c..7b83fcb67 100644 --- a/packages/core/test/spl-token/fee-payer-partial-sign-transfer.test.ts +++ b/packages/core/test/spl-token/fee-payer-partial-sign-transfer.test.ts @@ -4,9 +4,9 @@ import { Setup } from '../../../shared/test/testSetup'; import { SplToken } from '../../src/'; import { RandomAsset } from '../../../storage/test/randomAsset'; import { StorageType } from '../../../shared-metaplex'; -import { KeyPair, Pubkey } from '../../../shared'; +import { KeypairAccount, Pubkey } from '../../../shared'; -let source: KeyPair; +let source: KeypairAccount; const TOKEN_TOTAL_AMOUNT = 10000000; const MINT_DECIMAL = 2; @@ -26,8 +26,8 @@ describe('SplToken', () => { }); it('transfer feePayerPartialSign', async () => { - const tokenOwner = KeyPair.create(); - const receipt = KeyPair.create(); + const tokenOwner = KeypairAccount.create(); + const receipt = KeypairAccount.create(); console.log('# owner: ', tokenOwner.pubkey); console.log('# receipt: ', receipt.pubkey); diff --git a/packages/core/test/spl-token/mint.test.ts b/packages/core/test/spl-token/mint.test.ts index 645a7e86f..9f46a7a21 100644 --- a/packages/core/test/spl-token/mint.test.ts +++ b/packages/core/test/spl-token/mint.test.ts @@ -4,9 +4,9 @@ import { Setup } from '../../../shared/test/testSetup'; import { SplToken } from '../../src/'; import { RandomAsset } from '../../../storage/test/randomAsset'; import { StorageType } from '../../../shared-metaplex'; -import { KeyPair } from '../../../shared'; +import { KeypairAccount } from '../../../shared/src/keypair-account'; -let source: KeyPair; +let source: KeypairAccount; let mintStr: string; const TOKEN_TOTAL_AMOUNT = 10000000; diff --git a/packages/core/test/spl-token/transfer.test.ts b/packages/core/test/spl-token/transfer.test.ts index 16a1694ed..fa8d042d1 100644 --- a/packages/core/test/spl-token/transfer.test.ts +++ b/packages/core/test/spl-token/transfer.test.ts @@ -4,10 +4,10 @@ import { Setup } from '../../../shared/test/testSetup'; import { SplToken } from '../../src/'; import { RandomAsset } from '../../../storage/test/randomAsset'; import { StorageType } from '../../../shared-metaplex'; -import { KeyPair } from '../../../shared'; +import { KeypairAccount } from '../../../shared/src/keypair-account'; -let source: KeyPair; -let dest: KeyPair; +let source: KeypairAccount; +let dest: KeypairAccount; const TOKEN_TOTAL_AMOUNT = 10000000; const MINT_DECIMAL = 2; const TOKEN_METADATA = { diff --git a/packages/nft/dist/cjs/metaplex/mint.js b/packages/nft/dist/cjs/metaplex/mint.js index fb009c7e1..92526ad9f 100644 --- a/packages/nft/dist/cjs/metaplex/mint.js +++ b/packages/nft/dist/cjs/metaplex/mint.js @@ -19,10 +19,10 @@ var Metaplex; (function (Metaplex) { // original: plugins/nftModule/operations/createNft.ts const createNftBuilder = (params, owner, feePayer) => __awaiter(this, void 0, void 0, function* () { - const mint = shared_1.KeyPair.create(); + const mint = shared_1.KeypairAccount.create(); const updateAuthority = owner; const mintAuthority = owner; - const inst = yield Metaplex.createNftBuilderInstruction(feePayer.toKeypair(), params, mint.toKeypair(), updateAuthority.toKeypair(), mintAuthority.toKeypair(), new shared_1.KeyPair({ secret: owner }).pubkey); + const inst = yield Metaplex.createNftBuilderInstruction(feePayer.toKeypair(), params, mint.toKeypair(), updateAuthority.toKeypair(), mintAuthority.toKeypair(), new shared_1.KeypairAccount({ secret: owner }).pubkey); return new shared_1.MintInstruction(inst, [feePayer.toKeypair(), mint.toKeypair(), owner.toKeypair()], undefined, mint); }); Metaplex.createNftBuilderInstruction = (feePayer, params, useNewMint, updateAuthority, mintAuthority, tokenOwner) => __awaiter(this, void 0, void 0, function* () { diff --git a/packages/nft/dist/cjs/metaplex/mint.js.map b/packages/nft/dist/cjs/metaplex/mint.js.map index 1fb27f35a..4b31fff41 100644 --- a/packages/nft/dist/cjs/metaplex/mint.js.map +++ b/packages/nft/dist/cjs/metaplex/mint.js.map @@ -1 +1 @@ -{"version":3,"file":"mint.js","sourceRoot":"","sources":["../../../src/metaplex/mint.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,iDAQ8B;AAC9B,mDAAgD;AAEhD,mEAKuC;AAEvC,gDAKiC;AAEjC,gFAAiG;AAEjG,IAAiB,QAAQ,CA6JxB;AA7JD,WAAiB,QAAQ;IACvB,sDAAsD;IACtD,MAAM,gBAAgB,GAAG,CACvB,MAA8B,EAC9B,KAAa,EACb,QAAgB,EACU,EAAE;QAC5B,MAAM,IAAI,GAAG,gBAAO,CAAC,MAAM,EAAE,CAAC;QAC9B,MAAM,eAAe,GAAG,KAAK,CAAC;QAC9B,MAAM,aAAa,GAAG,KAAK,CAAC;QAE5B,MAAM,IAAI,GAAG,MAAM,SAAA,2BAA2B,CAC5C,QAAQ,CAAC,SAAS,EAAE,EACpB,MAAM,EACN,IAAI,CAAC,SAAS,EAAE,EAChB,eAAe,CAAC,SAAS,EAAE,EAC3B,aAAa,CAAC,SAAS,EAAE,EACzB,IAAI,gBAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,CACtC,CAAC;QAEF,OAAO,IAAI,wBAAe,CACxB,IAAI,EACJ,CAAC,QAAQ,CAAC,SAAS,EAAE,EAAE,IAAI,CAAC,SAAS,EAAE,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC,EAC3D,SAAS,EACT,IAAI,CACL,CAAC;IACJ,CAAC,CAAA,CAAC;IAEW,oCAA2B,GAAG,CACzC,QAAkC,EAClC,MAA8B,EAC9B,UAAmB,EACnB,eAAyC,EACzC,aAAuC,EACvC,UAAkB,EACiB,EAAE;;QACrC,IAAA,iBAAQ,EAAC,YAAY,EAA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AC,0BAA0B,EAAE,oBAAoB,CAAC,CAAC;YAC3D,IAAA,iBAAQ,EAAC,qBAAqB,EAAE,eAAe,CAAC,CAAC;YAEjD,MAAM,SAAS,mBACb,GAAG;gBACH,oBAAoB,IACjB,eAAe,CACnB,CAAC;YACF,OAAO,MAAM,gBAAgB,CAAC,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;QACzD,CAAC,CAAA,CAAC,CAAC;IACL,CAAC,CAAA,CAAC;AACJ,CAAC,EA7JgB,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QA6JxB"} \ No newline at end of file diff --git a/packages/nft/dist/esm/metaplex/mint.js b/packages/nft/dist/esm/metaplex/mint.js index dbf7a7ce6..300551417 100644 --- a/packages/nft/dist/esm/metaplex/mint.js +++ b/packages/nft/dist/esm/metaplex/mint.js @@ -7,7 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -import { debugLog, Try, MintInstruction, KeyPair, } from '@solana-suite/shared'; +import { debugLog, Try, MintInstruction, KeypairAccount, } from '@solana-suite/shared'; import { Storage } from '@solana-suite/storage'; import { Bundlr, Validator, } from '@solana-suite/shared-metaplex'; import { token, TransactionBuilder, } from '@metaplex-foundation/js'; @@ -16,10 +16,10 @@ export var Metaplex; (function (Metaplex) { // original: plugins/nftModule/operations/createNft.ts const createNftBuilder = (params, owner, feePayer) => __awaiter(this, void 0, void 0, function* () { - const mint = KeyPair.create(); + const mint = KeypairAccount.create(); const updateAuthority = owner; const mintAuthority = owner; - const inst = yield Metaplex.createNftBuilderInstruction(feePayer.toKeypair(), params, mint.toKeypair(), updateAuthority.toKeypair(), mintAuthority.toKeypair(), new KeyPair({ secret: owner }).pubkey); + const inst = yield Metaplex.createNftBuilderInstruction(feePayer.toKeypair(), params, mint.toKeypair(), updateAuthority.toKeypair(), mintAuthority.toKeypair(), new KeypairAccount({ secret: owner }).pubkey); return new MintInstruction(inst, [feePayer.toKeypair(), mint.toKeypair(), owner.toKeypair()], undefined, mint); }); Metaplex.createNftBuilderInstruction = (feePayer, params, useNewMint, updateAuthority, mintAuthority, tokenOwner) => __awaiter(this, void 0, void 0, function* () { diff --git a/packages/nft/dist/esm/metaplex/mint.js.map b/packages/nft/dist/esm/metaplex/mint.js.map index e08518b30..24b950f09 100644 --- a/packages/nft/dist/esm/metaplex/mint.js.map +++ b/packages/nft/dist/esm/metaplex/mint.js.map @@ -1 +1 @@ -{"version":3,"file":"mint.js","sourceRoot":"","sources":["../../../src/metaplex/mint.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAEL,QAAQ,EACR,GAAG,EACH,eAAe,EAEf,OAAO,GAER,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EACL,MAAM,EACN,SAAS,GAGV,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAEL,KAAK,EACL,kBAAkB,GAEnB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,sCAAsC,EAAE,MAAM,yCAAyC,CAAC;AAEjG,MAAM,KAAW,QAAQ,CA6JxB;AA7JD,WAAiB,QAAQ;IACvB,sDAAsD;IACtD,MAAM,gBAAgB,GAAG,CACvB,MAA8B,EAC9B,KAAa,EACb,QAAgB,EACU,EAAE;QAC5B,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;QAC9B,MAAM,eAAe,GAAG,KAAK,CAAC;QAC9B,MAAM,aAAa,GAAG,KAAK,CAAC;QAE5B,MAAM,IAAI,GAAG,MAAM,SAAA,2BAA2B,CAC5C,QAAQ,CAAC,SAAS,EAAE,EACpB,MAAM,EACN,IAAI,CAAC,SAAS,EAAE,EAChB,eAAe,CAAC,SAAS,EAAE,EAC3B,aAAa,CAAC,SAAS,EAAE,EACzB,IAAI,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,CACtC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,CAAC,CAAC;YAC1D,IAAI,KAAK,CAAC,KAAK,EAAE;gBACf,MAAM,KAAK,CAAC,KAAK,CAAC;aACnB;YAED,MAAM,KAAK,GAAG,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC;YAC1C,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,iBAAiB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YAC/D,MAAM,EAAE,GAAG,EAAE,oBAAoB,EAAE,eAAe,EAAE,GAAG,QAAQ,CAAC;YAEhE,QAAQ,CAAC,wBAAwB,EAAE,GAAG,CAAC,CAAC;YACxC,QAAQ,CAAC,0BAA0B,EAAE,oBAAoB,CAAC,CAAC;YAC3D,QAAQ,CAAC,qBAAqB,EAAE,eAAe,CAAC,CAAC;YAEjD,MAAM,SAAS,mBACb,GAAG;gBACH,oBAAoB,IACjB,eAAe,CACnB,CAAC;YACF,OAAO,MAAM,gBAAgB,CAAC,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;QACzD,CAAC,CAAA,CAAC,CAAC;IACL,CAAC,CAAA,CAAC;AACJ,CAAC,EA7JgB,QAAQ,KAAR,QAAQ,QA6JxB"} \ No newline at end of file diff --git a/packages/nft/src/metaplex/mint.ts b/packages/nft/src/metaplex/mint.ts index 7ccaa42c0..43f9e59f7 100644 --- a/packages/nft/src/metaplex/mint.ts +++ b/packages/nft/src/metaplex/mint.ts @@ -5,7 +5,7 @@ import { Try, MintInstruction, Secret, - KeyPair, + KeypairAccount, Pubkey, } from '@solana-suite/shared'; import { Storage } from '@solana-suite/storage'; @@ -33,7 +33,7 @@ export namespace Metaplex { owner: Secret, feePayer: Secret ): Promise => { - const mint = KeyPair.create(); + const mint = KeypairAccount.create(); const updateAuthority = owner; const mintAuthority = owner; @@ -43,7 +43,7 @@ export namespace Metaplex { mint.toKeypair(), updateAuthority.toKeypair(), mintAuthority.toKeypair(), - new KeyPair({ secret: owner }).pubkey + new KeypairAccount({ secret: owner }).pubkey ); return new MintInstruction( diff --git a/packages/nft/test/metaplex/mint.test.ts b/packages/nft/test/metaplex/mint.test.ts index f2d5fed99..b43446840 100644 --- a/packages/nft/test/metaplex/mint.test.ts +++ b/packages/nft/test/metaplex/mint.test.ts @@ -4,9 +4,9 @@ import { Setup } from '../../../shared/test/testSetup'; import { Metaplex } from '../../src/metaplex'; import { RandomAsset } from '../../../storage/test/randomAsset'; import { ValidatorError } from '../../../shared-metaplex/'; -import { KeyPair } from '../../../shared'; +import { KeypairAccount } from '../../../shared'; -let source: KeyPair; +let source: KeypairAccount; describe('Metaplex', () => { before(async () => { diff --git a/packages/nft/test/metaplex/transfer.test.ts b/packages/nft/test/metaplex/transfer.test.ts index 0a2d83ab3..c198a7fc6 100644 --- a/packages/nft/test/metaplex/transfer.test.ts +++ b/packages/nft/test/metaplex/transfer.test.ts @@ -1,13 +1,13 @@ import { describe, it } from 'mocha'; import { assert } from 'chai'; import { Airdrop } from '../../../core'; -import { KeyPair, Pubkey } from '../../../shared'; +import { KeypairAccount, Pubkey } from '../../../shared'; import { Setup } from '../../../shared/test/testSetup'; import { Metaplex } from '../../src/metaplex'; import { RandomAsset } from '../../../storage/test/randomAsset'; -let source: KeyPair; -let dest: KeyPair; +let source: KeypairAccount; +let dest: KeypairAccount; describe('Metaplex', () => { before(async () => { @@ -71,7 +71,7 @@ describe('Metaplex', () => { // every call requestAirdrop(), raise internal error it.skip('[Arweave] mint nft with feePayer', async () => { - const feePayer = KeyPair.create(); + const feePayer = KeypairAccount.create(); await Airdrop.request(feePayer.pubkey); const asset = RandomAsset.get(); diff --git a/packages/phantom/dist/cjs/metaplex/mint.js b/packages/phantom/dist/cjs/metaplex/mint.js index 84906df32..d70bd6ba3 100644 --- a/packages/phantom/dist/cjs/metaplex/mint.js +++ b/packages/phantom/dist/cjs/metaplex/mint.js @@ -23,7 +23,7 @@ var PhantomMetaplex; const updateAuthority = metaplex.identity(); const mintAuthority = metaplex.identity(); const tokenOwner = metaplex.identity(); - const useNewMint = shared_1.KeyPair.create(); + const useNewMint = shared_1.KeypairAccount.create(); const instructions = yield nft_1.Metaplex.createNftBuilderInstruction(payer, params, useNewMint.secret.toKeypair(), updateAuthority, mintAuthority, tokenOwner.publicKey.toString()); const transaction = new web3_js_1.Transaction(); transaction.feePayer = payer.publicKey; diff --git a/packages/phantom/dist/cjs/metaplex/mint.js.map b/packages/phantom/dist/cjs/metaplex/mint.js.map index 24976ace7..ffd0f195c 100644 --- a/packages/phantom/dist/cjs/metaplex/mint.js.map +++ b/packages/phantom/dist/cjs/metaplex/mint.js.map @@ -1 +1 @@ -{"version":3,"file":"mint.js","sourceRoot":"","sources":["../../../src/metaplex/mint.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAsE;AAGtE,2CAA6C;AAC7C,mDAAgD;AAChD,iDAA4E;AAC5E,mEAMuC;AAGvC,IAAiB,eAAe,CAkF/B;AAlFD,WAAiB,eAAe;IAC9B,MAAM,gBAAgB,GAAG,CACvB,MAA8B,EAC9B,OAAgB,EACY,EAAE;QAC9B,MAAM,QAAQ,GAAG,wBAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACtC,MAAM,KAAK,GAAG,QAAQ,CAAC,QAAQ,EAAE,CAAC;QAClC,MAAM,eAAe,GAAG,QAAQ,CAAC,QAAQ,EAAE,CAAC;QAC5C,MAAM,aAAa,GAAG,QAAQ,CAAC,QAAQ,EAAE,CAAC;QAC1C,MAAM,UAAU,GAAG,QAAQ,CAAC,QAAQ,EAAE,CAAC;QACvC,MAAM,UAAU,GAAG,gBAAO,CAAC,MAAM,EAAE,CAAC;QACpC,MAAM,YAAY,GAAG,MAAM,cAAQ,CAAC,2BAA2B,CAC7D,KAAK,EACL,MAAM,EACN,UAAU,CAAC,MAAM,CAAC,SAAS,EAAE,EAC7B,eAAe,EACf,aAAa,EACb,UAAU,CAAC,SAAS,CAAC,QAAQ,EAAE,CAChC,CAAC;QAEF,MAAM,WAAW,GAAG,IAA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,MAAM,UAAU,CAAC,kBAAkB,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC;YACpE,MAAM,aAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;YAC7B,OAAO,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC;QACnC,CAAC,CAAA,CAAC,CAAC;IACL,CAAC,CAAA,CAAC;AACJ,CAAC,EAlFgB,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAkF/B"} \ No newline at end of file diff --git a/packages/phantom/dist/cjs/types/metaplex.d.ts b/packages/phantom/dist/cjs/types/metaplex.d.ts index b77f7e922..c789f278e 100644 --- a/packages/phantom/dist/cjs/types/metaplex.d.ts +++ b/packages/phantom/dist/cjs/types/metaplex.d.ts @@ -1,6 +1,6 @@ -import { KeyPair } from '@solana-suite/shared'; +import { KeypairAccount } from '@solana-suite/shared'; import { Transaction } from '@solana/web3.js'; export type InitializeNftMint = { - useNewMint: KeyPair; + useNewMint: KeypairAccount; tx: Transaction; }; diff --git a/packages/phantom/dist/esm/metaplex/mint.js b/packages/phantom/dist/esm/metaplex/mint.js index 9472445a0..f6f05b9a8 100644 --- a/packages/phantom/dist/esm/metaplex/mint.js +++ b/packages/phantom/dist/esm/metaplex/mint.js @@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge import { Transaction } from '@solana/web3.js'; import { Metaplex } from '@solana-suite/nft'; import { Storage } from '@solana-suite/storage'; -import { debugLog, Node, Try, KeyPair } from '@solana-suite/shared'; +import { debugLog, Node, Try, KeypairAccount, } from '@solana-suite/shared'; import { Bundlr, Validator, } from '@solana-suite/shared-metaplex'; export var PhantomMetaplex; (function (PhantomMetaplex) { @@ -20,7 +20,7 @@ export var PhantomMetaplex; const updateAuthority = metaplex.identity(); const mintAuthority = metaplex.identity(); const tokenOwner = metaplex.identity(); - const useNewMint = KeyPair.create(); + const useNewMint = KeypairAccount.create(); const instructions = yield Metaplex.createNftBuilderInstruction(payer, params, useNewMint.secret.toKeypair(), updateAuthority, mintAuthority, tokenOwner.publicKey.toString()); const transaction = new Transaction(); transaction.feePayer = payer.publicKey; diff --git a/packages/phantom/dist/esm/metaplex/mint.js.map b/packages/phantom/dist/esm/metaplex/mint.js.map index 4d522d442..3f6c74878 100644 --- a/packages/phantom/dist/esm/metaplex/mint.js.map +++ b/packages/phantom/dist/esm/metaplex/mint.js.map @@ -1 +1 @@ -{"version":3,"file":"mint.js","sourceRoot":"","sources":["../../../src/metaplex/mint.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAA0B,MAAM,iBAAiB,CAAC;AAGtE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAU,GAAG,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EACL,MAAM,EACN,SAAS,GAIV,MAAM,+BAA+B,CAAC;AAGvC,MAAM,KAAW,eAAe,CAkF/B;AAlFD,WAAiB,eAAe;IAC9B,MAAM,gBAAgB,GAAG,CACvB,MAA8B,EAC9B,OAAgB,EACY,EAAE;QAC9B,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACtC,MAAM,KAAK,GAAG,QAAQ,CAAC,QAAQ,EAAE,CAAC;QAClC,MAAM,eAAe,GAAG,QAAQ,CAAC,QAAQ,EAAE,CAAC;QAC5C,MAAM,aAAa,GAAG,QAAQ,CAAC,QAAQ,EAAE,CAAC;QAC1C,MAAM,UAAU,GAAG,QAAQ,CAAC,QAAQ,EAAE,CAAC;QACvC,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;QACpC,MAAM,YAAY,GAAG,MAAM,QAAQ,CAAC,2BAA2B,CAC7D,KAAK,EACL,MAAM,EACN,UAAU,CAAC,MAAM,CAAC,SAAS,EAAE,EA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C,EAAE,CAAC,CAAC;YACzD,QAAQ,CACN,+BAA+B,EAC/B,MAAM,EACN,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC,CACzD,CAAC;YACF,MAAM,GAAG,GAAG,MAAM,UAAU,CAAC,kBAAkB,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC;YACpE,MAAM,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;YAC7B,OAAO,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC;QACnC,CAAC,CAAA,CAAC,CAAC;IACL,CAAC,CAAA,CAAC;AACJ,CAAC,EAlFgB,eAAe,KAAf,eAAe,QAkF/B"} \ No newline at end of file diff --git a/packages/phantom/dist/esm/types/metaplex.d.ts b/packages/phantom/dist/esm/types/metaplex.d.ts index b77f7e922..c789f278e 100644 --- a/packages/phantom/dist/esm/types/metaplex.d.ts +++ b/packages/phantom/dist/esm/types/metaplex.d.ts @@ -1,6 +1,6 @@ -import { KeyPair } from '@solana-suite/shared'; +import { KeypairAccount } from '@solana-suite/shared'; import { Transaction } from '@solana/web3.js'; export type InitializeNftMint = { - useNewMint: KeyPair; + useNewMint: KeypairAccount; tx: Transaction; }; diff --git a/packages/phantom/src/metaplex/mint.ts b/packages/phantom/src/metaplex/mint.ts index 381530396..ea3156b15 100644 --- a/packages/phantom/src/metaplex/mint.ts +++ b/packages/phantom/src/metaplex/mint.ts @@ -3,7 +3,13 @@ import { CreateNftBuilderParams } from '@metaplex-foundation/js'; import { Metaplex } from '@solana-suite/nft'; import { Storage } from '@solana-suite/storage'; -import { debugLog, Node, Result, Try, KeyPair } from '@solana-suite/shared'; +import { + debugLog, + Node, + Result, + Try, + KeypairAccount, +} from '@solana-suite/shared'; import { Bundlr, Validator, @@ -23,7 +29,7 @@ export namespace PhantomMetaplex { const updateAuthority = metaplex.identity(); const mintAuthority = metaplex.identity(); const tokenOwner = metaplex.identity(); - const useNewMint = KeyPair.create(); + const useNewMint = KeypairAccount.create(); const instructions = await Metaplex.createNftBuilderInstruction( payer, params, diff --git a/packages/phantom/src/types/metaplex.ts b/packages/phantom/src/types/metaplex.ts index 0f863325c..279afbd56 100644 --- a/packages/phantom/src/types/metaplex.ts +++ b/packages/phantom/src/types/metaplex.ts @@ -1,7 +1,7 @@ -import { KeyPair } from '@solana-suite/shared'; +import { KeypairAccount } from '@solana-suite/shared'; import { Transaction } from '@solana/web3.js'; export type InitializeNftMint = { - useNewMint: KeyPair; + useNewMint: KeypairAccount; tx: Transaction; }; diff --git a/packages/shared-metaplex/test/bundlr.test.ts b/packages/shared-metaplex/test/bundlr.test.ts index 082fd5ae2..5b2553b56 100644 --- a/packages/shared-metaplex/test/bundlr.test.ts +++ b/packages/shared-metaplex/test/bundlr.test.ts @@ -1,6 +1,6 @@ import { describe, it } from 'mocha'; import { Setup } from '../../shared/test/testSetup'; -import { KeyPair } from '../../shared/'; +import { KeypairAccount } from '../../shared/'; import { assert } from 'chai'; import { Bundlr } from '../src/bundlr'; import { @@ -8,7 +8,7 @@ import { Metaplex as MetaplexFoundation, } from '@metaplex-foundation/js'; -let source: KeyPair; +let source: KeypairAccount; describe('Bundlr', () => { before(async () => { diff --git a/packages/shared/dist/cjs/global.js b/packages/shared/dist/cjs/global.js index 6e4d19e55..eea734c09 100644 --- a/packages/shared/dist/cjs/global.js +++ b/packages/shared/dist/cjs/global.js @@ -20,7 +20,7 @@ const node_1 = require("./node"); const result_1 = require("./result"); const batch_submit_1 = require("./instruction/batch-submit"); require("./types/global"); -const key_pair_1 = require("./key-pair"); +const keypair_account_1 = require("./keypair-account"); /** * senTransaction() TransactionInstruction * @@ -60,7 +60,7 @@ Array.prototype.submit = function () { * @returns PublicKey */ String.prototype.toPublicKey = function () { - if (!key_pair_1.KeyPair.isPubkey(this.toString())) { + if (!keypair_account_1.KeypairAccount.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new web3_js_1.PublicKey(this); @@ -72,7 +72,7 @@ String.prototype.toPublicKey = function () { * @returns Keypair */ String.prototype.toKeypair = function () { - if (!key_pair_1.KeyPair.isSecret(this.toString())) { + if (!keypair_account_1.KeypairAccount.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = bs58_1.default.decode(this); diff --git a/packages/shared/dist/cjs/global.js.map b/packages/shared/dist/cjs/global.js.map index f62245dd3..481efba8f 100644 --- a/packages/shared/dist/cjs/global.js.map +++ b/packages/shared/dist/cjs/global.js.map @@ -1 +1 @@ -{"version":3,"file":"global.js","sourceRoot":"","sources":["../../src/global.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6CAAuE;AACvE,gDAAsB;AAEtB,2CAAwC;AACxC,iCAA8B;AAC9B,qCAAkC;AAElC,6DAAmE;AACnE,0BAAwB;AACxB,yCAAqC;AAErC;;;;;GAKG;AAEH,sDAAsD;AACtD,gBAAgB;AAChB,KAAK,CAAC,SAAS,CAAC,MAAM,GAAG;;QACvB,MAAM,YAAY,GAAmB,EAAE,CAAC;QACxC,mBAAmB;QACnB,iFAAiF;QACjF,OAAO,GAAG,CAAC,GAAS,EAAE;YACpB,IAAI,CAAC,GAAG,CAAC,CAAC;YACV,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;gBACtB,IAAI,GAAG,CAAC,KAAK,EAAE;oBACb,MAAM,SAAS,GAAW,GAAG,CAAC,KAAK,CAAC,OAAiB,CAAC;oBACtD,MAAM,KAAK,CAAC,wCAAwC,CAAC,IAAI,SAAS,EAAE,CAAC,CAAC;iBACvE;qBAAM,IAAI,GAAG,CAAC,IAAI,EAAE;oBACnB,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,KAAqB,CAAC,CAAC;iBAC9C;qBAAM;oBACL,YAAY,CAAC,IAAI,CAAC,GAAmB,CAAC,CAAC;iBACxC;gBACD,CAAC,EAAE,CAAC;aACL;YACD,OAAO,0BAAM,CA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AAO,eAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;SACtB;QACD,OAAO,eAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAW,CAAC,CAAC,CAAC;KACvC;YAAS;QACR,IAAI,YAAY,EAAE;YAChB,IAAA,gBAAQ,EAAC,kBAAkB,EAAE,YAAY,CAAC,CAAC;YAC3C,YAAY,EAAE,CAAC;SAChB;KACF;AACH,CAAC;AAzBD,kBAyBC"} \ No newline at end of file +{"version":3,"file":"global.js","sourceRoot":"","sources":["../../src/global.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6CAAuE;AACvE,gDAAsB;AAEtB,2CAAwC;AACxC,iCAA8B;AAC9B,qCAAkC;AAElC,6DAAmE;AACnE,0BAAwB;AACxB,uDAAmD;AAEnD;;;;;GAKG;AAEH,sDAAsD;AACtD,gBAAgB;AAChB,KAAK,CAAC,SAAS,CAAC,MAAM,GAAG;;QACvB,MAAM,YAAY,GAAmB,EAAE,CAAC;QACxC,mBAAmB;QACnB,iFAAiF;QACjF,OAAO,GAAG,CAAC,GAAS,EAAE;YACpB,IAAI,CAAC,GAAG,CAAC,CAAC;YACV,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;gBACtB,IAAI,GAAG,CAAC,KAAK,EAAE;oBACb,MAAM,SAAS,GAAW,GAAG,CAAC,KAAK,CAAC,OAAiB,CAAC;oBACtD,MAAM,KAAK,CAAC,wCAAwC,CAAC,IAAI,SAAS,EAAE,CAAC,CAAC;iBACvE;qBAAM,IAAI,GAAG,CAAC,IAAI,EAAE;oBACnB,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,KAAqB,CAAC,CAAC;iBAC9C;qBAAM;oBACL,YAAY,CAAC,IAAI,CAAC,GAAmB,CAAC,CAAC;iBACxC;gBACD,CAAC,EAAE,CAAC;aACL;YACD,OAAO,0BAAM,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;QAC1C,CAAC,CAAA,CAAC,CAAC;IACL,CAAC;CAA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AAG,CAAC,KAAK,CAAC,CAAW,CAAC,CAAC,CAAC;KACvC;YAAS;QACR,IAAI,YAAY,EAAE;YAChB,IAAA,gBAAQ,EAAC,kBAAkB,EAAE,YAAY,CAAC,CAAC;YAC3C,YAAY,EAAE,CAAC;SAChB;KACF;AACH,CAAC;AAzBD,kBAyBC"} \ No newline at end of file diff --git a/packages/shared/dist/cjs/index.d.ts b/packages/shared/dist/cjs/index.d.ts index f620d7729..60546f43d 100644 --- a/packages/shared/dist/cjs/index.d.ts +++ b/packages/shared/dist/cjs/index.d.ts @@ -1,7 +1,7 @@ export * from './constants'; export * from './instruction'; export * from './global'; -export * from './key-pair'; +export * from './keypair-account'; export * from './node'; export * from './mint-instruction'; export * from './partial-signInstruction'; diff --git a/packages/shared/dist/cjs/index.js b/packages/shared/dist/cjs/index.js index 113221afe..0972f0876 100644 --- a/packages/shared/dist/cjs/index.js +++ b/packages/shared/dist/cjs/index.js @@ -17,7 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); __exportStar(require("./constants"), exports); __exportStar(require("./instruction"), exports); __exportStar(require("./global"), exports); -__exportStar(require("./key-pair"), exports); +__exportStar(require("./keypair-account"), exports); __exportStar(require("./node"), exports); __exportStar(require("./mint-instruction"), exports); __exportStar(require("./partial-signInstruction"), exports); diff --git a/packages/shared/dist/cjs/index.js.map b/packages/shared/dist/cjs/index.js.map index 4100b24d5..a6005b626 100644 --- a/packages/shared/dist/cjs/index.js.map +++ b/packages/shared/dist/cjs/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,gDAA8B;AAC9B,2CAAyB;AACzB,6CAA2B;AAC3B,yCAAuB;AACvB,qDAAmC;AACnC,4DAA0C;AAC1C,2CAAyB;AACzB,0CAAwB"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,gDAA8B;AAC9B,2CAAyB;AACzB,oDAAkC;AAClC,yCAAuB;AACvB,qDAAmC;AACnC,4DAA0C;AAC1C,2CAAyB;AACzB,0CAAwB"} \ No newline at end of file diff --git a/packages/shared/dist/cjs/key-pair.js.map b/packages/shared/dist/cjs/key-pair.js.map deleted file mode 100644 index 8ae0e8cb6..000000000 --- a/packages/shared/dist/cjs/key-pair.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"key-pair.js","sourceRoot":"","sources":["../../src/key-pair.ts"],"names":[],"mappings":";;;;;;AAAA,6CAAqD;AAErD,gDAAsB;AAEtB,MAAa,OAAO;IAIlB,YAAY,MAA2C;QACrD,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;YAClB,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;YAC1C,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;SAC5C;aAAM;YACL,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;SAC7B;QACD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAC9B,CAAC;IAED,WAAW;QACT,OAAO,IAAI,mBAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACpC,CAAC;IAED,SAAS;QACP,MAAM,OAAO,GAAG,cAAE,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACvC,OAAO,iBAAO,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IACxC,CAAC;;AArBH,0BA2CC;AApBQ,gBAAQ,GAAG,CAAC,KAAa,EAAmB,EAAE,CACnD,sBAAsB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAE9B,gBAAQ,GAAG,CAAC,KAAa,EAAmB,EAAE,CACnD,mBAAmB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAE3B,cAAM,GAAG,GAAY,EAAE;IAC5B,MAAM,OAAO,GAAG,iBAAO,CAAC,QAAQ,EAAE,CAAC;IACnC,OAAO,IAAI,OAAO,CAAC;QACjB,MAAM,EAAE,OAAO,CAAC,SAAS,CAAC,QAAQ,EAAY;QAC9C,MAAM,EAAE,cAAE,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAW;KAC/C,CAAC,CAAC;AACL,CAAC,CAAC;AAEK,iBAAS,GAAG,CAAC,OAAgB,EAAW,EAAE;IAC/C,OAAO,IAAI,OAAO,CAAC;QACjB,MAAM,EAAE,OAAO,CAAC,SAAS,CAAC,QAAQ,EAAY;QAC9C,MAAM,EAAE,cAAE,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAW;KAC/C,CAAC,CAAC;AACL,CAAC,CAAA"} \ No newline at end of file diff --git a/packages/shared/dist/cjs/key-pair.d.ts b/packages/shared/dist/cjs/keypair-account.d.ts similarity index 63% rename from packages/shared/dist/cjs/key-pair.d.ts rename to packages/shared/dist/cjs/keypair-account.d.ts index 47f687d79..9f2eaa4ef 100644 --- a/packages/shared/dist/cjs/key-pair.d.ts +++ b/packages/shared/dist/cjs/keypair-account.d.ts @@ -1,6 +1,6 @@ import { Keypair, PublicKey } from '@solana/web3.js'; -import { Pubkey, Secret } from './types/key-pair'; -export declare class KeyPair { +import { Pubkey, Secret } from './types/keypair-account'; +export declare class KeypairAccount { pubkey: Pubkey; secret: Secret; constructor(params: { @@ -11,6 +11,6 @@ export declare class KeyPair { toKeypair(): Keypair; static isPubkey: (value: string) => value is Pubkey; static isSecret: (value: string) => value is Secret; - static create: () => KeyPair; - static toKeyPair: (keypair: Keypair) => KeyPair; + static create: () => KeypairAccount; + static toKeyPair: (keypair: Keypair) => KeypairAccount; } diff --git a/packages/shared/dist/cjs/key-pair.js b/packages/shared/dist/cjs/keypair-account.js similarity index 72% rename from packages/shared/dist/cjs/key-pair.js rename to packages/shared/dist/cjs/keypair-account.js index 1ef8c0e4d..29b22c7db 100644 --- a/packages/shared/dist/cjs/key-pair.js +++ b/packages/shared/dist/cjs/keypair-account.js @@ -3,10 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.KeyPair = void 0; +exports.KeypairAccount = void 0; const web3_js_1 = require("@solana/web3.js"); const bs58_1 = __importDefault(require("bs58")); -class KeyPair { +class KeypairAccount { constructor(params) { if (!params.pubkey) { const keypair = params.secret.toKeypair(); @@ -25,20 +25,20 @@ class KeyPair { return web3_js_1.Keypair.fromSecretKey(decoded); } } -exports.KeyPair = KeyPair; -KeyPair.isPubkey = (value) => /^[0-9a-zA-Z]{32,44}$/.test(value); -KeyPair.isSecret = (value) => /^[0-9a-zA-Z]{88}$/.test(value); -KeyPair.create = () => { +exports.KeypairAccount = KeypairAccount; +KeypairAccount.isPubkey = (value) => /^[0-9a-zA-Z]{32,44}$/.test(value); +KeypairAccount.isSecret = (value) => /^[0-9a-zA-Z]{88}$/.test(value); +KeypairAccount.create = () => { const keypair = web3_js_1.Keypair.generate(); - return new KeyPair({ + return new KeypairAccount({ pubkey: keypair.publicKey.toString(), secret: bs58_1.default.encode(keypair.secretKey), }); }; -KeyPair.toKeyPair = (keypair) => { - return new KeyPair({ +KeypairAccount.toKeyPair = (keypair) => { + return new KeypairAccount({ pubkey: keypair.publicKey.toString(), secret: bs58_1.default.encode(keypair.secretKey), }); }; -//# sourceMappingURL=key-pair.js.map \ No newline at end of file +//# sourceMappingURL=keypair-account.js.map \ No newline at end of file diff --git a/packages/shared/dist/cjs/keypair-account.js.map b/packages/shared/dist/cjs/keypair-account.js.map new file mode 100644 index 000000000..de5559475 --- /dev/null +++ b/packages/shared/dist/cjs/keypair-account.js.map @@ -0,0 +1 @@ +{"version":3,"file":"keypair-account.js","sourceRoot":"","sources":["../../src/keypair-account.ts"],"names":[],"mappings":";;;;;;AAAA,6CAAqD;AAErD,gDAAsB;AAEtB,MAAa,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,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAW;KAC/C,CAAC,CAAC;AACL,CAAC,CAAC"} \ No newline at end of file diff --git a/packages/shared/dist/cjs/types/index.d.ts b/packages/shared/dist/cjs/types/index.d.ts index 07421948d..8047e6fa9 100644 --- a/packages/shared/dist/cjs/types/index.d.ts +++ b/packages/shared/dist/cjs/types/index.d.ts @@ -1,2 +1,2 @@ export * from './global'; -export * from './key-pair'; +export * from './keypair-account'; diff --git a/packages/shared/dist/cjs/types/index.js b/packages/shared/dist/cjs/types/index.js index 88866eb84..27398fe02 100644 --- a/packages/shared/dist/cjs/types/index.js +++ b/packages/shared/dist/cjs/types/index.js @@ -15,5 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) { }; Object.defineProperty(exports, "__esModule", { value: true }); __exportStar(require("./global"), exports); -__exportStar(require("./key-pair"), exports); +__exportStar(require("./keypair-account"), exports); //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/packages/shared/dist/cjs/types/index.js.map b/packages/shared/dist/cjs/types/index.js.map index df3207c61..6256d2322 100644 --- a/packages/shared/dist/cjs/types/index.js.map +++ b/packages/shared/dist/cjs/types/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,6CAA2B"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,oDAAkC"} \ No newline at end of file diff --git a/packages/shared/dist/cjs/types/key-pair.js.map b/packages/shared/dist/cjs/types/key-pair.js.map deleted file mode 100644 index 7163f5387..000000000 --- a/packages/shared/dist/cjs/types/key-pair.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"key-pair.js","sourceRoot":"","sources":["../../../src/types/key-pair.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/packages/shared/dist/cjs/types/key-pair.d.ts b/packages/shared/dist/cjs/types/keypair-account.d.ts similarity index 100% rename from packages/shared/dist/cjs/types/key-pair.d.ts rename to packages/shared/dist/cjs/types/keypair-account.d.ts diff --git a/packages/shared/dist/cjs/types/key-pair.js b/packages/shared/dist/cjs/types/keypair-account.js similarity index 64% rename from packages/shared/dist/cjs/types/key-pair.js rename to packages/shared/dist/cjs/types/keypair-account.js index 2e21b0246..81f6a9f53 100644 --- a/packages/shared/dist/cjs/types/key-pair.js +++ b/packages/shared/dist/cjs/types/keypair-account.js @@ -1,3 +1,3 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=key-pair.js.map \ No newline at end of file +//# sourceMappingURL=keypair-account.js.map \ No newline at end of file diff --git a/packages/shared/dist/cjs/types/keypair-account.js.map b/packages/shared/dist/cjs/types/keypair-account.js.map new file mode 100644 index 000000000..0e232eb2b --- /dev/null +++ b/packages/shared/dist/cjs/types/keypair-account.js.map @@ -0,0 +1 @@ +{"version":3,"file":"keypair-account.js","sourceRoot":"","sources":["../../../src/types/keypair-account.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/packages/shared/dist/esm/global.js b/packages/shared/dist/esm/global.js index fe8176a6a..a43e4bfb4 100644 --- a/packages/shared/dist/esm/global.js +++ b/packages/shared/dist/esm/global.js @@ -14,7 +14,7 @@ import { Node } from './node'; import { Result } from './result'; import { Instruction as _Batch } from './instruction/batch-submit'; import './types/global'; -import { KeyPair } from './key-pair'; +import { KeypairAccount } from './keypair-account'; /** * senTransaction() TransactionInstruction * @@ -54,7 +54,7 @@ Array.prototype.submit = function () { * @returns PublicKey */ String.prototype.toPublicKey = function () { - if (!KeyPair.isPubkey(this.toString())) { + if (!KeypairAccount.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new PublicKey(this); @@ -66,7 +66,7 @@ String.prototype.toPublicKey = function () { * @returns Keypair */ String.prototype.toKeypair = function () { - if (!KeyPair.isSecret(this.toString())) { + if (!KeypairAccount.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = bs.decode(this); diff --git a/packages/shared/dist/esm/global.js.map b/packages/shared/dist/esm/global.js.map index e77d191af..8b0f43e5a 100644 --- a/packages/shared/dist/esm/global.js.map +++ b/packages/shared/dist/esm/global.js.map @@ -1 +1 @@ -{"version":3,"file":"global.js","sourceRoot":"","sources":["../../src/global.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,EAAE,MAAM,MAAM,CAAC;AAEtB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,WAAW,IAAI,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,gBAAgB,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC;;;;;GAKG;AAEH,sDAAsD;AACtD,gBAAgB;AAChB,KAAK,CAAC,SAAS,CAAC,MAAM,GAAG;;QACvB,MAAM,YAAY,GAAmB,EAAE,CAAC;QACxC,mBAAmB;QACnB,iFAAiF;QACjF,OAAO,GAAG,CAAC,GAAS,EAAE;YACpB,IAAI,CAAC,GAAG,CAAC,CAAC;YACV,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;gBACtB,IAAI,GAAG,CAAC,KAAK,EAAE;oBACb,MAAM,SAAS,GAAW,GAAG,CAAC,KAAK,CAAC,OAAiB,CAAC;oBACtD,MAAM,KAAK,CAAC,wCAAwC,CAAC,IAAI,SAAS,EAAE,CAAC,CAAC;iBACvE;qBAAM,IAAI,GAAG,CAAC,IAAI,EAAE;oBACnB,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,KAAqB,C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;QACV,IAAI,CAAC,YAAY,KAAK,EAAE;YACtB,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;SACtB;QACD,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAW,CAAC,CAAC,CAAC;KACvC;YAAS;QACR,IAAI,YAAY,EAAE;YAChB,QAAQ,CAAC,kBAAkB,EAAE,YAAY,CAAC,CAAC;YAC3C,YAAY,EAAE,CAAC;SAChB;KACF;AACH,CAAC"} \ No newline at end of file +{"version":3,"file":"global.js","sourceRoot":"","sources":["../../src/global.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,EAAE,MAAM,MAAM,CAAC;AAEtB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,WAAW,IAAI,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,gBAAgB,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;;;;GAKG;AAEH,sDAAsD;AACtD,gBAAgB;AAChB,KAAK,CAAC,SAAS,CAAC,MAAM,GAAG;;QACvB,MAAM,YAAY,GAAmB,EAAE,CAAC;QACxC,mBAAmB;QACnB,iFAAiF;QACjF,OAAO,GAAG,CAAC,GAAS,EAAE;YACpB,IAAI,CAAC,GAAG,CAAC,CAAC;YACV,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;gBACtB,IAAI,GAAG,CAAC,KAAK,EAAE;oBACb,MAAM,SAAS,GAAW,GAAG,CAAC,KAAK,CAAC,OAAiB,CAAC;oBACtD,MAAM,KAAK,CAAC,wCAAwC,CAAC,IAAI,SAAS,EAAE,CAAC,CAAC;iBACvE;qBAA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YACL,OAAO,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;SACrB;KACF;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,CAAC,YAAY,KAAK,EAAE;YACtB,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;SACtB;QACD,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAW,CAAC,CAAC,CAAC;KACvC;YAAS;QACR,IAAI,YAAY,EAAE;YAChB,QAAQ,CAAC,kBAAkB,EAAE,YAAY,CAAC,CAAC;YAC3C,YAAY,EAAE,CAAC;SAChB;KACF;AACH,CAAC"} \ No newline at end of file diff --git a/packages/shared/dist/esm/index.d.ts b/packages/shared/dist/esm/index.d.ts index f620d7729..60546f43d 100644 --- a/packages/shared/dist/esm/index.d.ts +++ b/packages/shared/dist/esm/index.d.ts @@ -1,7 +1,7 @@ export * from './constants'; export * from './instruction'; export * from './global'; -export * from './key-pair'; +export * from './keypair-account'; export * from './node'; export * from './mint-instruction'; export * from './partial-signInstruction'; diff --git a/packages/shared/dist/esm/index.js b/packages/shared/dist/esm/index.js index 36373a493..82de3cc3c 100644 --- a/packages/shared/dist/esm/index.js +++ b/packages/shared/dist/esm/index.js @@ -1,7 +1,7 @@ export * from './constants'; export * from './instruction'; export * from './global'; -export * from './key-pair'; +export * from './keypair-account'; export * from './node'; export * from './mint-instruction'; export * from './partial-signInstruction'; diff --git a/packages/shared/dist/esm/index.js.map b/packages/shared/dist/esm/index.js.map index dbec41c80..71fb6a72c 100644 --- a/packages/shared/dist/esm/index.js.map +++ b/packages/shared/dist/esm/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,QAAQ,CAAC;AACvB,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"} \ No newline at end of file diff --git a/packages/shared/dist/esm/key-pair.js.map b/packages/shared/dist/esm/key-pair.js.map deleted file mode 100644 index 746195e11..000000000 --- a/packages/shared/dist/esm/key-pair.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"key-pair.js","sourceRoot":"","sources":["../../src/key-pair.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,EAAE,MAAM,MAAM,CAAC;AAEtB,MAAM,OAAO,OAAO;IAIlB,YAAY,MAA2C;QACrD,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;YAClB,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;YAC1C,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;SAC5C;aAAM;YACL,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;SAC7B;QACD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAC9B,CAAC;IAED,WAAW;QACT,OAAO,IAAI,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACpC,CAAC;IAED,SAAS;QACP,MAAM,OAAO,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACvC,OAAO,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IACxC,CAAC;;AAEM,gBAAQ,GAAG,CAAC,KAAa,EAAmB,EAAE,CACnD,sBAAsB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAE9B,gBAAQ,GAAG,CAAC,KAAa,EAAmB,EAAE,CACnD,mBAAmB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAE3B,cAAM,GAAG,GAAY,EAAE;IAC5B,MAAM,OAAO,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IACnC,OAAO,IAAI,OAAO,CAAC;QACjB,MAAM,EAAE,OAAO,CAAC,SAAS,CAAC,QAAQ,EAAY;QAC9C,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAW;KAC/C,CAAC,CAAC;AACL,CAAC,CAAC;AAEK,iBAAS,GAAG,CAAC,OAAgB,EAAW,EAAE;IAC/C,OAAO,IAAI,OAAO,CAAC;QACjB,MAAM,EAAE,OAAO,CAAC,SAAS,CAAC,QAAQ,EAAY;QAC9C,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAW;KAC/C,CAAC,CAAC;AACL,CAAC,CAAA"} \ No newline at end of file diff --git a/packages/shared/dist/esm/key-pair.d.ts b/packages/shared/dist/esm/keypair-account.d.ts similarity index 63% rename from packages/shared/dist/esm/key-pair.d.ts rename to packages/shared/dist/esm/keypair-account.d.ts index 47f687d79..9f2eaa4ef 100644 --- a/packages/shared/dist/esm/key-pair.d.ts +++ b/packages/shared/dist/esm/keypair-account.d.ts @@ -1,6 +1,6 @@ import { Keypair, PublicKey } from '@solana/web3.js'; -import { Pubkey, Secret } from './types/key-pair'; -export declare class KeyPair { +import { Pubkey, Secret } from './types/keypair-account'; +export declare class KeypairAccount { pubkey: Pubkey; secret: Secret; constructor(params: { @@ -11,6 +11,6 @@ export declare class KeyPair { toKeypair(): Keypair; static isPubkey: (value: string) => value is Pubkey; static isSecret: (value: string) => value is Secret; - static create: () => KeyPair; - static toKeyPair: (keypair: Keypair) => KeyPair; + static create: () => KeypairAccount; + static toKeyPair: (keypair: Keypair) => KeypairAccount; } diff --git a/packages/shared/dist/esm/key-pair.js b/packages/shared/dist/esm/keypair-account.js similarity index 69% rename from packages/shared/dist/esm/key-pair.js rename to packages/shared/dist/esm/keypair-account.js index c64ef7e26..bd3fdf6b9 100644 --- a/packages/shared/dist/esm/key-pair.js +++ b/packages/shared/dist/esm/keypair-account.js @@ -1,6 +1,6 @@ import { Keypair, PublicKey } from '@solana/web3.js'; import bs from 'bs58'; -export class KeyPair { +export class KeypairAccount { constructor(params) { if (!params.pubkey) { const keypair = params.secret.toKeypair(); @@ -19,19 +19,19 @@ export class KeyPair { return Keypair.fromSecretKey(decoded); } } -KeyPair.isPubkey = (value) => /^[0-9a-zA-Z]{32,44}$/.test(value); -KeyPair.isSecret = (value) => /^[0-9a-zA-Z]{88}$/.test(value); -KeyPair.create = () => { +KeypairAccount.isPubkey = (value) => /^[0-9a-zA-Z]{32,44}$/.test(value); +KeypairAccount.isSecret = (value) => /^[0-9a-zA-Z]{88}$/.test(value); +KeypairAccount.create = () => { const keypair = Keypair.generate(); - return new KeyPair({ + return new KeypairAccount({ pubkey: keypair.publicKey.toString(), secret: bs.encode(keypair.secretKey), }); }; -KeyPair.toKeyPair = (keypair) => { - return new KeyPair({ +KeypairAccount.toKeyPair = (keypair) => { + return new KeypairAccount({ pubkey: keypair.publicKey.toString(), secret: bs.encode(keypair.secretKey), }); }; -//# sourceMappingURL=key-pair.js.map \ No newline at end of file +//# sourceMappingURL=keypair-account.js.map \ No newline at end of file diff --git a/packages/shared/dist/esm/keypair-account.js.map b/packages/shared/dist/esm/keypair-account.js.map new file mode 100644 index 000000000..66d7ae039 --- /dev/null +++ b/packages/shared/dist/esm/keypair-account.js.map @@ -0,0 +1 @@ +{"version":3,"file":"keypair-account.js","sourceRoot":"","sources":["../../src/keypair-account.ts"],"names":[],"mappings":"AAAA,OA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AAc,CAAC;QACxB,MAAM,EAAE,OAAO,CAAC,SAAS,CAAC,QAAQ,EAAY;QAC9C,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAW;KAC/C,CAAC,CAAC;AACL,CAAC,CAAC"} \ No newline at end of file diff --git a/packages/shared/dist/esm/types/index.d.ts b/packages/shared/dist/esm/types/index.d.ts index 07421948d..8047e6fa9 100644 --- a/packages/shared/dist/esm/types/index.d.ts +++ b/packages/shared/dist/esm/types/index.d.ts @@ -1,2 +1,2 @@ export * from './global'; -export * from './key-pair'; +export * from './keypair-account'; diff --git a/packages/shared/dist/esm/types/index.js b/packages/shared/dist/esm/types/index.js index bd7abcf4b..cfb42498f 100644 --- a/packages/shared/dist/esm/types/index.js +++ b/packages/shared/dist/esm/types/index.js @@ -1,3 +1,3 @@ export * from './global'; -export * from './key-pair'; +export * from './keypair-account'; //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/packages/shared/dist/esm/types/index.js.map b/packages/shared/dist/esm/types/index.js.map index 4ecf633ae..56a7a5fee 100644 --- a/packages/shared/dist/esm/types/index.js.map +++ b/packages/shared/dist/esm/types/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC"} \ No newline at end of file diff --git a/packages/shared/dist/esm/types/key-pair.js b/packages/shared/dist/esm/types/key-pair.js deleted file mode 100644 index 96ed765ff..000000000 --- a/packages/shared/dist/esm/types/key-pair.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=key-pair.js.map \ No newline at end of file diff --git a/packages/shared/dist/esm/types/key-pair.js.map b/packages/shared/dist/esm/types/key-pair.js.map deleted file mode 100644 index 7163f5387..000000000 --- a/packages/shared/dist/esm/types/key-pair.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"key-pair.js","sourceRoot":"","sources":["../../../src/types/key-pair.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/packages/shared/dist/esm/types/key-pair.d.ts b/packages/shared/dist/esm/types/keypair-account.d.ts similarity index 100% rename from packages/shared/dist/esm/types/key-pair.d.ts rename to packages/shared/dist/esm/types/keypair-account.d.ts diff --git a/packages/shared/dist/esm/types/keypair-account.js b/packages/shared/dist/esm/types/keypair-account.js new file mode 100644 index 000000000..53a00abbb --- /dev/null +++ b/packages/shared/dist/esm/types/keypair-account.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=keypair-account.js.map \ No newline at end of file diff --git a/packages/shared/dist/esm/types/keypair-account.js.map b/packages/shared/dist/esm/types/keypair-account.js.map new file mode 100644 index 000000000..0e232eb2b --- /dev/null +++ b/packages/shared/dist/esm/types/keypair-account.js.map @@ -0,0 +1 @@ +{"version":3,"file":"keypair-account.js","sourceRoot":"","sources":["../../../src/types/keypair-account.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/packages/shared/src/global.ts b/packages/shared/src/global.ts index df399b13b..30234881b 100644 --- a/packages/shared/src/global.ts +++ b/packages/shared/src/global.ts @@ -7,7 +7,7 @@ import { Result } from './result'; import { Instruction as _Instruction } from './instruction'; import { Instruction as _Batch } from './instruction/batch-submit'; import './types/global'; -import { KeyPair } from './key-pair'; +import { KeypairAccount } from './keypair-account'; /** * senTransaction() TransactionInstruction @@ -46,7 +46,7 @@ Array.prototype.submit = async function () { * @returns PublicKey */ String.prototype.toPublicKey = function () { - if (!KeyPair.isPubkey(this.toString())) { + if (!KeypairAccount.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new PublicKey(this); @@ -59,7 +59,7 @@ String.prototype.toPublicKey = function () { * @returns Keypair */ String.prototype.toKeypair = function () { - if (!KeyPair.isSecret(this.toString())) { + if (!KeypairAccount.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = bs.decode(this as string); diff --git a/packages/shared/src/index.ts b/packages/shared/src/index.ts index f620d7729..60546f43d 100644 --- a/packages/shared/src/index.ts +++ b/packages/shared/src/index.ts @@ -1,7 +1,7 @@ export * from './constants'; export * from './instruction'; export * from './global'; -export * from './key-pair'; +export * from './keypair-account'; export * from './node'; export * from './mint-instruction'; export * from './partial-signInstruction'; diff --git a/packages/shared/src/key-pair.ts b/packages/shared/src/keypair-account.ts similarity index 80% rename from packages/shared/src/key-pair.ts rename to packages/shared/src/keypair-account.ts index ef4ee4398..a2c6692a8 100644 --- a/packages/shared/src/key-pair.ts +++ b/packages/shared/src/keypair-account.ts @@ -1,8 +1,8 @@ import { Keypair, PublicKey } from '@solana/web3.js'; -import { Pubkey, Secret } from './types/key-pair'; +import { Pubkey, Secret } from './types/keypair-account'; import bs from 'bs58'; -export class KeyPair { +export class KeypairAccount { pubkey: Pubkey; secret: Secret; @@ -31,18 +31,18 @@ export class KeyPair { static isSecret = (value: string): value is Secret => /^[0-9a-zA-Z]{88}$/.test(value); - static create = (): KeyPair => { + static create = (): KeypairAccount => { const keypair = Keypair.generate(); - return new KeyPair({ + return new KeypairAccount({ pubkey: keypair.publicKey.toString() as Pubkey, secret: bs.encode(keypair.secretKey) as Secret, }); }; - static toKeyPair = (keypair: Keypair): KeyPair => { - return new KeyPair({ + static toKeyPair = (keypair: Keypair): KeypairAccount => { + return new KeypairAccount({ pubkey: keypair.publicKey.toString() as Pubkey, secret: bs.encode(keypair.secretKey) as Secret, }); - } + }; } diff --git a/packages/shared/src/types/index.ts b/packages/shared/src/types/index.ts index 07421948d..8047e6fa9 100644 --- a/packages/shared/src/types/index.ts +++ b/packages/shared/src/types/index.ts @@ -1,2 +1,2 @@ export * from './global'; -export * from './key-pair'; +export * from './keypair-account'; diff --git a/packages/shared/src/types/key-pair.ts b/packages/shared/src/types/keypair-account.ts similarity index 100% rename from packages/shared/src/types/key-pair.ts rename to packages/shared/src/types/keypair-account.ts diff --git a/packages/shared/test/key-pair.test.ts b/packages/shared/test/keypair-account.test.ts similarity index 82% rename from packages/shared/test/key-pair.test.ts rename to packages/shared/test/keypair-account.test.ts index 0210b201a..6ae8898cd 100644 --- a/packages/shared/test/key-pair.test.ts +++ b/packages/shared/test/keypair-account.test.ts @@ -1,8 +1,8 @@ import { describe, it } from 'mocha'; import { assert } from 'chai'; import { PublicKey, Keypair } from '@solana/web3.js'; -import { KeyPair } from '../src/key-pair'; -import { Pubkey } from '../src/types/key-pair'; +import { KeypairAccount } from '../src/keypair-account'; +import { Pubkey } from '../src/types/keypair-account'; import '../src/global'; import bs from 'bs58'; @@ -30,18 +30,18 @@ describe('KeypairStr', () => { }); it('Create KeyPair Object', async () => { - const obj = new KeyPair({ pubkey: PUBKEY, secret: SECRET }); + const obj = new KeypairAccount({ pubkey: PUBKEY, secret: SECRET }); assert.isNotEmpty(obj); }); it('is Pubkey', async () => { - assert.isTrue(KeyPair.isPubkey(PUBKEY)); + assert.isTrue(KeypairAccount.isPubkey(PUBKEY)); }); it('is Secret', async () => { const secret = '54SjeQxyNVS6xkNrqDSQ5aKyMCu7gzySku2p6UnPqF83NDDRfHsVrXQtiEVtsn7t5QWRCTm2VGmwkmjzxcSoYexa'; - assert.isTrue(KeyPair.isSecret(secret)); + assert.isTrue(KeypairAccount.isSecret(secret)); }); it('Keypair to KeyPair', async () => { @@ -50,7 +50,7 @@ describe('KeypairStr', () => { pubkey: keypair.publicKey.toString(), secret: bs.encode(keypair.secretKey).toString(), }; - const res = KeyPair.toKeyPair(keypair); + const res = KeypairAccount.toKeyPair(keypair); assert.deepEqual(res, expeted); }); diff --git a/packages/shared/test/testSetup.ts b/packages/shared/test/testSetup.ts index 3130766d1..5c114eed3 100644 --- a/packages/shared/test/testSetup.ts +++ b/packages/shared/test/testSetup.ts @@ -2,7 +2,7 @@ import fs from 'fs'; import bs from 'bs58'; import { Keypair, PublicKey, LAMPORTS_PER_SOL } from '@solana/web3.js'; import { Constants } from '../src/constants'; -import { Node, debugLog, KeyPair, Pubkey, Secret } from '../src/'; +import { Node, debugLog, KeypairAccount, Pubkey, Secret } from '../src/'; console.log(`\u001b[33m === TEST START ===`); console.log(`\u001b[33m solana-network: ${Constants.currentCluster}`); @@ -11,18 +11,21 @@ export namespace Setup { const TEMP_KEYPAIR_FILE = `../../solana-${Constants.currentCluster}-keypair`; export const generateKeyPair = async (): Promise<{ - source: KeyPair; - dest: KeyPair; + source: KeypairAccount; + dest: KeypairAccount; }> => { const { source, dest } = await fetchSourceAndDest(); log(source, dest); return { - source: new KeyPair({ pubkey: source.pubkey, secret: source.secret }), - dest: new KeyPair({ pubkey: dest.pubkey, secret: dest.secret }), + source: new KeypairAccount({ + pubkey: source.pubkey, + secret: source.secret, + }), + dest: new KeypairAccount({ pubkey: dest.pubkey, secret: dest.secret }), }; }; - const log = (source: KeyPair, dest: KeyPair) => { + const log = (source: KeypairAccount, dest: KeypairAccount) => { debugLog(`# source.pubkey:`, source.pubkey); debugLog(`# source.secret: `, source.secret); debugLog(`# destination.pubkey:`, dest.pubkey); @@ -58,12 +61,12 @@ export namespace Setup { await requestAirdrop(source.publicKey); - const sourceObject = new KeyPair({ + const sourceObject = new KeypairAccount({ pubkey: source.publicKey.toBase58() as Pubkey, secret: bs.encode(source.secretKey) as Secret, }); - const destObject = new KeyPair({ + const destObject = new KeypairAccount({ pubkey: dest.publicKey.toBase58() as Pubkey, secret: bs.encode(dest.secretKey) as Secret, }); @@ -73,7 +76,7 @@ export namespace Setup { return data; }; - const templateKeyPair = (source: KeyPair, dest: KeyPair) => { + const templateKeyPair = (source: KeypairAccount, dest: KeypairAccount) => { return { source: { pubkey: source.pubkey, diff --git a/packages/storage/test/arweave.test.ts b/packages/storage/test/arweave.test.ts index bc9d825a9..fd9c85513 100644 --- a/packages/storage/test/arweave.test.ts +++ b/packages/storage/test/arweave.test.ts @@ -1,12 +1,12 @@ import { describe, it } from 'mocha'; import { assert } from 'chai'; -import { KeyPair } from '../../shared'; +import { KeypairAccount } from '../../shared'; import { Setup } from '../../shared/test/testSetup'; import { RandomAsset } from './randomAsset'; import { Arweave } from '../src/arweave'; import { Currency } from '@metaplex-foundation/js'; -let source: KeyPair; +let source: KeypairAccount; describe('StorageArweave', () => { before(async () => { diff --git a/packages/storage/test/randomAsset.ts b/packages/storage/test/randomAsset.ts index cd98556e0..5ef1835ab 100644 --- a/packages/storage/test/randomAsset.ts +++ b/packages/storage/test/randomAsset.ts @@ -1,7 +1,4 @@ -import { - JsonMetadata, - MetaplexFileContent, -} from '@metaplex-foundation/js'; +import { JsonMetadata, MetaplexFileContent } from '@metaplex-foundation/js'; import fs from 'fs'; export namespace RandomAsset { diff --git a/yarn.lock b/yarn.lock index f2fea3bb1..0148a51c0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3,9 +3,9 @@ "@babel/runtime@^7.12.5", "@babel/runtime@^7.17.2": - version "7.20.13" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.20.13.tgz#7055ab8a7cff2b8f6058bf6ae45ff84ad2aded4b" - integrity sha512-gt3PKXs0DBoL9xCvOIIZ2NEqAGZqHjAnmVbfQtB620V0uReIQutpel14KcneZuer7UioY8ALKZ7iocavvzTNFA== + version "7.21.0" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.21.0.tgz#5b55c9d394e5fcf304909a8b00c07dc217b56673" + integrity sha512-xwII0//EObnq89Ji5AKYQaRYiW/nZ3llSv29d49IuxPhKbtJoLP+9QUUZ4nVragQVtaVGeZrpB+ZtG/Pdy/POw== dependencies: regenerator-runtime "^0.13.11" @@ -604,9 +604,9 @@ "@solana/web3.js" "^1.66.2" "@metaplex-foundation/mpl-token-metadata@^2.7.0": - version "2.8.3" - resolved "https://registry.yarnpkg.com/@metaplex-foundation/mpl-token-metadata/-/mpl-token-metadata-2.8.3.tgz#8bbaa08240753db871b45b273fdf6355fd00ce93" - integrity sha512-rUwp2zqrsxu+1ahhqyeu9ytluroVG7vgLS2eunYfkRL545dl8z0eXLE7A16H9Uejln0abyKiSXUsdV8SoXpJIg== + version "2.8.4" + resolved "https://registry.yarnpkg.com/@metaplex-foundation/mpl-token-metadata/-/mpl-token-metadata-2.8.4.tgz#ef73e17060a2bb7a75f5aa9201070f16db462364" + integrity sha512-QhEMjmYzwBAiJAzDv8M9GuNLfqExt46oVrIYlKml7htP3RpkG7aEzr24wWlgLos2YoGwabWwg2d+iT9DergCQw== dependencies: "@metaplex-foundation/beet" "^0.7.1" "@metaplex-foundation/beet-solana" "^0.4.0" @@ -948,13 +948,13 @@ "@types/yargs-parser" "*" "@typescript-eslint/eslint-plugin@^5.40.0": - version "5.52.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.52.0.tgz#5fb0d43574c2411f16ea80f5fc335b8eaa7b28a8" - integrity sha512-lHazYdvYVsBokwCdKOppvYJKaJ4S41CgKBcPvyd0xjZNbvQdhn/pnJlGtQksQ/NhInzdaeaSarlBjDXHuclEbg== + version "5.53.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.53.0.tgz#24b8b4a952f3c615fe070e3c461dd852b5056734" + integrity sha512-alFpFWNucPLdUOySmXCJpzr6HKC3bu7XooShWM+3w/EL6J2HIoB2PFxpLnq4JauWVk6DiVeNKzQlFEaE+X9sGw== dependencies: - "@typescript-eslint/scope-manager" "5.52.0" - "@typescript-eslint/type-utils" "5.52.0" - "@typescript-eslint/utils" "5.52.0" + "@typescript-eslint/scope-manager" "5.53.0" + "@typescript-eslint/type-utils" "5.53.0" + "@typescript-eslint/utils" "5.53.0" debug "^4.3.4" grapheme-splitter "^1.0.4" ignore "^5.2.0" @@ -964,71 +964,71 @@ tsutils "^3.21.0" "@typescript-eslint/parser@^5.40.0": - version "5.52.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.52.0.tgz#73c136df6c0133f1d7870de7131ccf356f5be5a4" - integrity sha512-e2KiLQOZRo4Y0D/b+3y08i3jsekoSkOYStROYmPUnGMEoA0h+k2qOH5H6tcjIc68WDvGwH+PaOrP1XRzLJ6QlA== + version "5.53.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.53.0.tgz#a1f2b9ae73b83181098747e96683f1b249ecab52" + integrity sha512-MKBw9i0DLYlmdOb3Oq/526+al20AJZpANdT6Ct9ffxcV8nKCHz63t/S0IhlTFNsBIHJv+GY5SFJ0XfqVeydQrQ== dependencies: - "@typescript-eslint/scope-manager" "5.52.0" - "@typescript-eslint/types" "5.52.0" - "@typescript-eslint/typescript-estree" "5.52.0" + "@typescript-eslint/scope-manager" "5.53.0" + "@typescript-eslint/types" "5.53.0" + "@typescript-eslint/typescript-estree" "5.53.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@5.52.0": - version "5.52.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.52.0.tgz#a993d89a0556ea16811db48eabd7c5b72dcb83d1" - integrity sha512-AR7sxxfBKiNV0FWBSARxM8DmNxrwgnYMPwmpkC1Pl1n+eT8/I2NAUPuwDy/FmDcC6F8pBfmOcaxcxRHspgOBMw== +"@typescript-eslint/scope-manager@5.53.0": + version "5.53.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.53.0.tgz#42b54f280e33c82939275a42649701024f3fafef" + integrity sha512-Opy3dqNsp/9kBBeCPhkCNR7fmdSQqA+47r21hr9a14Bx0xnkElEQmhoHga+VoaoQ6uDHjDKmQPIYcUcKJifS7w== dependencies: - "@typescript-eslint/types" "5.52.0" - "@typescript-eslint/visitor-keys" "5.52.0" + "@typescript-eslint/types" "5.53.0" + "@typescript-eslint/visitor-keys" "5.53.0" -"@typescript-eslint/type-utils@5.52.0": - version "5.52.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.52.0.tgz#9fd28cd02e6f21f5109e35496df41893f33167aa" - integrity sha512-tEKuUHfDOv852QGlpPtB3lHOoig5pyFQN/cUiZtpw99D93nEBjexRLre5sQZlkMoHry/lZr8qDAt2oAHLKA6Jw== +"@typescript-eslint/type-utils@5.53.0": + version "5.53.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.53.0.tgz#41665449935ba9b4e6a1ba6e2a3f4b2c31d6cf97" + integrity sha512-HO2hh0fmtqNLzTAme/KnND5uFNwbsdYhCZghK2SoxGp3Ifn2emv+hi0PBUjzzSh0dstUIFqOj3bp0AwQlK4OWw== dependencies: - "@typescript-eslint/typescript-estree" "5.52.0" - "@typescript-eslint/utils" "5.52.0" + "@typescript-eslint/typescript-estree" "5.53.0" + "@typescript-eslint/utils" "5.53.0" debug "^4.3.4" tsutils "^3.21.0" -"@typescript-eslint/types@5.52.0": - version "5.52.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.52.0.tgz#19e9abc6afb5bd37a1a9bea877a1a836c0b3241b" - integrity sha512-oV7XU4CHYfBhk78fS7tkum+/Dpgsfi91IIDy7fjCyq2k6KB63M6gMC0YIvy+iABzmXThCRI6xpCEyVObBdWSDQ== +"@typescript-eslint/types@5.53.0": + version "5.53.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.53.0.tgz#f79eca62b97e518ee124086a21a24f3be267026f" + integrity sha512-5kcDL9ZUIP756K6+QOAfPkigJmCPHcLN7Zjdz76lQWWDdzfOhZDTj1irs6gPBKiXx5/6O3L0+AvupAut3z7D2A== -"@typescript-eslint/typescript-estree@5.52.0": - version "5.52.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.52.0.tgz#6408cb3c2ccc01c03c278cb201cf07e73347dfca" - integrity sha512-WeWnjanyEwt6+fVrSR0MYgEpUAuROxuAH516WPjUblIrClzYJj0kBbjdnbQXLpgAN8qbEuGywiQsXUVDiAoEuQ== +"@typescript-eslint/typescript-estree@5.53.0": + version "5.53.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.53.0.tgz#bc651dc28cf18ab248ecd18a4c886c744aebd690" + integrity sha512-eKmipH7QyScpHSkhbptBBYh9v8FxtngLquq292YTEQ1pxVs39yFBlLC1xeIZcPPz1RWGqb7YgERJRGkjw8ZV7w== dependencies: - "@typescript-eslint/types" "5.52.0" - "@typescript-eslint/visitor-keys" "5.52.0" + "@typescript-eslint/types" "5.53.0" + "@typescript-eslint/visitor-keys" "5.53.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/utils@5.52.0": - version "5.52.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.52.0.tgz#b260bb5a8f6b00a0ed51db66bdba4ed5e4845a72" - integrity sha512-As3lChhrbwWQLNk2HC8Ree96hldKIqk98EYvypd3It8Q1f8d5zWyIoaZEp2va5667M4ZyE7X8UUR+azXrFl+NA== +"@typescript-eslint/utils@5.53.0": + version "5.53.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.53.0.tgz#e55eaad9d6fffa120575ffaa530c7e802f13bce8" + integrity sha512-VUOOtPv27UNWLxFwQK/8+7kvxVC+hPHNsJjzlJyotlaHjLSIgOCKj9I0DBUjwOOA64qjBwx5afAPjksqOxMO0g== dependencies: "@types/json-schema" "^7.0.9" "@types/semver" "^7.3.12" - "@typescript-eslint/scope-manager" "5.52.0" - "@typescript-eslint/types" "5.52.0" - "@typescript-eslint/typescript-estree" "5.52.0" + "@typescript-eslint/scope-manager" "5.53.0" + "@typescript-eslint/types" "5.53.0" + "@typescript-eslint/typescript-estree" "5.53.0" eslint-scope "^5.1.1" eslint-utils "^3.0.0" semver "^7.3.7" -"@typescript-eslint/visitor-keys@5.52.0": - version "5.52.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.52.0.tgz#e38c971259f44f80cfe49d97dbffa38e3e75030f" - integrity sha512-qMwpw6SU5VHCPr99y274xhbm+PRViK/NATY6qzt+Et7+mThGuFSl/ompj2/hrBlRP/kq+BFdgagnOSgw9TB0eA== +"@typescript-eslint/visitor-keys@5.53.0": + version "5.53.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.53.0.tgz#8a5126623937cdd909c30d8fa72f79fa56cc1a9f" + integrity sha512-JqNLnX3leaHFZEN0gCh81sIvgrp/2GOACZNgO4+Tkf64u51kTpAyWFOY8XHx8XuXr3N2C9zgPPHtcpMg6z1g0w== dependencies: - "@typescript-eslint/types" "5.52.0" + "@typescript-eslint/types" "5.53.0" eslint-visitor-keys "^3.3.0" "@ungap/promise-all-settled@1.1.2": @@ -2222,9 +2222,9 @@ evp_bytestokey@^1.0.3: safe-buffer "^5.1.1" exponential-backoff@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/exponential-backoff/-/exponential-backoff-3.1.0.tgz#9409c7e579131f8bd4b32d7d8094a911040f2e68" - integrity sha512-oBuz5SYz5zzyuHINoe9ooePwSu0xApKWgeNzok4hZ5YKXFh9zrQBEM15CXqoZkJJPuI2ArvqjPQd8UKJA753XA== + version "3.1.1" + resolved "https://registry.yarnpkg.com/exponential-backoff/-/exponential-backoff-3.1.1.tgz#64ac7526fe341ab18a39016cd22c787d01e00bf6" + integrity sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw== external-editor@^3.0.3: version "3.1.0"