difftreelog
test upgrade dependencies
in: master
Old polkadot.js is no longer able to generate types for upgraded node
5 files changed
tests/README.mddiffbeforeafterboth--- a/tests/README.md
+++ b/tests/README.md
@@ -5,7 +5,7 @@
1. Checkout polkadot in sibling folder with this project
```bash
git clone https://github.com/paritytech/polkadot.git && cd polkadot
-git checkout release-v0.9.24
+git checkout release-v0.9.25
```
2. Build with nightly-2022-05-11
tests/package.jsondiffbeforeafterboth--- a/tests/package.json
+++ b/tests/package.json
@@ -5,7 +5,7 @@
"main": "",
"devDependencies": {
"@polkadot/ts": "0.4.22",
- "@polkadot/typegen": "8.7.2-15",
+ "@polkadot/typegen": "8.12.2",
"@types/chai": "^4.3.1",
"@types/chai-as-promised": "^7.1.5",
"@types/chai-like": "^1.1.1",
@@ -92,9 +92,9 @@
"license": "SEE LICENSE IN ../LICENSE",
"homepage": "",
"dependencies": {
- "@polkadot/api": "8.7.2-15",
- "@polkadot/api-contract": "8.7.2-15",
- "@polkadot/util-crypto": "9.4.1",
+ "@polkadot/api": "8.12.2",
+ "@polkadot/api-contract": "8.12.2",
+ "@polkadot/util-crypto": "10.0.2",
"bignumber.js": "^9.0.2",
"chai-as-promised": "^7.1.1",
"chai-like": "^1.1.1",
tests/src/rmrk/util/tx.tsdiffbeforeafterboth1import {ApiPromise} from '@polkadot/api';2import {Bytes, Option, u32, Vec} from '@polkadot/types-codec';3import {4 RmrkTraitsNftAccountIdOrCollectionNftTuple as NftOwner, RmrkTraitsPartEquippableList as EquippableList,5 RmrkTraitsPartPartType as PartType, RmrkTraitsResourceBasicResource as BasicResource,6 RmrkTraitsResourceComposableResource as ComposableResource, RmrkTraitsResourceResourceInfo as ResourceInfo, RmrkTraitsResourceSlotResource as SlotResource, RmrkTraitsTheme as Theme,7} from '@polkadot/types/lookup';8import {IKeyringPair} from '@polkadot/types/types';9import chai from 'chai';10import chaiAsPromised from 'chai-as-promised';11import '../../interfaces/augment-api';12import privateKey from '../../substrate/privateKey';13import {executeTransaction} from '../../substrate/substrate-api';14import {15 getBase,16 getCollection,17 getCollectionsCount,18 getEquippableList,19 getNft,20 getParts,21 getResources, 22 getResourcePriority, 23 getTheme,24 NftIdTuple,25} from './fetch';26import {27 extractRmrkCoreTxResult,28 extractRmrkEquipTxResult, isCollectionPropertyExists, isNftOwnedBy, isNftPropertyExists, isTxResultSuccess, makeNftOwner,29 findResourceById, getResourceById, checkResourceStatus,30} from './helpers';3132chai.use(chaiAsPromised);33const expect = chai.expect;3435export async function createCollection(36 api: ApiPromise,37 issuerUri: string,38 metadata: string,39 max: number | null,40 symbol: string,41): Promise<number> {42 let collectionId = 0;4344 const oldCollectionCount = await getCollectionsCount(api);45 const maxOptional = max ? max.toString() : null;46 const ss58Format = (api.registry.getChainProperties())!.toJSON().ss58Format;47 const issuer = privateKey(issuerUri, Number(ss58Format));48 const tx = api.tx.rmrkCore.createCollection(metadata, maxOptional, symbol);49 const events = await executeTransaction(api, issuer, tx);5051 const collectionResult = extractRmrkCoreTxResult(events, 'CollectionCreated', (data) => {52 return parseInt(data[1].toString(), 10);53 });54 expect(collectionResult.success, 'Error: unable to create a collection').to.be.true;5556 collectionId = collectionResult.successData!;5758 const newCollectionCount = await getCollectionsCount(api);59 const collectionOption = await getCollection(api, collectionId);6061 expect(newCollectionCount).to.be.equal(oldCollectionCount + 1, 'Error: NFT collection count should increase');62 expect(collectionOption.isSome, 'Error: unable to fetch created NFT collection').to.be.true;6364 const collection = collectionOption.unwrap();6566 expect(collection.metadata.toUtf8()).to.be.equal(metadata, 'Error: Invalid NFT collection metadata');67 expect(collection.max.isSome).to.be.equal(max !== null, 'Error: Invalid NFT collection max');6869 if (collection.max.isSome) {70 expect(collection.max.unwrap().toNumber()).to.be.equal(max, 'Error: Invalid NFT collection max');71 }72 expect(collection.symbol.toUtf8()).to.be.equal(symbol, "Error: Invalid NFT collection's symbol");73 expect(collection.nftsCount.toNumber()).to.be.equal(0, "Error: NFT collection shoudn't have any tokens");74 expect(collection.issuer.toString()).to.be.equal(issuer.address, 'Error: Invalid NFT collection issuer');7576 return collectionId;77}7879export async function changeIssuer(80 api: ApiPromise,81 issuerUri: string,82 collectionId: number,83 newIssuer: string,84) {85 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;86 const alice = privateKey(issuerUri, Number(ss58Format));87 const bob = privateKey(newIssuer, Number(ss58Format));8889 // This is only needed when RMRK uses `uniques` pallet by Parity90 // let tx = api.tx.uniques.setAcceptOwnership(91 // api.createType('Option<u32>', collectionId)92 // );93 // let events = await executeTransaction(api, bob, tx);94 // expect(isTxResultSuccess(events), 'Error: Unable to accept ownership').to.be.true;9596 const tx = api.tx.rmrkCore.changeCollectionIssuer(collectionId, bob.address);97 const events = await executeTransaction(api, alice, tx);98 const changeIssuerResult = extractRmrkCoreTxResult(events, 'IssuerChanged', (data) => {99 return parseInt(data[2].toString(), 10);100 });101 expect(changeIssuerResult.success, 'Error: Unable to change NFT collection issuer').to.be.true;102 expect(changeIssuerResult.successData!, 'Error: Invalid collection id after changing the issuer')103 .to.be.eq(collectionId);104105 await getCollection(api, collectionId).then((collectionOption) => {106 const collection = collectionOption.unwrap();107 expect(collection.issuer.toString())108 .to.be.deep.eq(bob.address, 'Error: Invalid NFT collection issuer');109 });110}111112export async function deleteCollection(113 api: ApiPromise,114 issuerUri: string,115 collectionId: string,116): Promise<number> {117 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;118 const issuer = privateKey(issuerUri, Number(ss58Format));119 const tx = api.tx.rmrkCore.destroyCollection(collectionId);120 const events = await executeTransaction(api, issuer, tx);121122 const collectionTxResult = extractRmrkCoreTxResult(123 events,124 'CollectionDestroy',125 (data) => {126 return parseInt(data[1].toString(), 10);127 },128 );129 expect(collectionTxResult.success, 'Error: Unable to delete NFT collection').to.be.true;130131 const collection = await getCollection(132 api,133 parseInt(collectionId, 10),134 );135 expect(collection.isEmpty, 'Error: NFT collection should be deleted').to.be.true;136137 return 0;138}139140export async function negativeDeleteCollection(141 api: ApiPromise,142 issuerUri: string,143 collectionId: string,144): Promise<number> {145 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;146 const issuer = privateKey(issuerUri, Number(ss58Format));147 const tx = api.tx.rmrkCore.destroyCollection(collectionId);148 await expect(executeTransaction(api, issuer, tx)).to.be.rejected;149150 return 0;151}152153export async function setNftProperty(154 api: ApiPromise,155 issuerUri: string,156 collectionId: number,157 nftId: number,158 key: string,159 value: string,160) {161 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;162 const issuer = privateKey(issuerUri, Number(ss58Format));163 const nftIdOpt = api.createType('Option<u32>', nftId);164 const tx = api.tx.rmrkCore.setProperty(165 collectionId,166 nftIdOpt,167 key,168 value,169 );170 const events = await executeTransaction(api, issuer, tx);171172 const propResult = extractRmrkCoreTxResult(events, 'PropertySet', (data) => {173 return {174 collectionId: parseInt(data[0].toString(), 10),175 nftId: data[1] as Option<u32>,176 key: data[2] as Bytes,177 value: data[3] as Bytes,178 };179 });180181 expect(propResult.success, 'Error: Unable to set NFT property').to.be.true;182 const eventData = propResult.successData!;183 const eventDescription = 'from set NFT property event';184185 expect(eventData.collectionId, 'Error: Invalid collection ID ' + eventDescription)186 .to.be.equal(collectionId);187188 expect(eventData.nftId.eq(nftIdOpt), 'Error: Invalid NFT ID ' + eventDescription)189 .to.be.true;190191 expect(eventData.key.eq(key), 'Error: Invalid property key ' + eventDescription)192 .to.be.true;193194 expect(eventData.value.eq(value), 'Error: Invalid property value ' + eventDescription)195 .to.be.true;196197 expect(198 await isNftPropertyExists(api, collectionId, nftId, key, value),199 'Error: NFT property is not found',200 ).to.be.true;201}202203export async function mintNft(204 api: ApiPromise,205 issuerUri: string,206 ownerUri: string | null,207 collectionId: number,208 metadata: string,209 recipientUri: string | null = null,210 royalty: number | null = null,211 transferable = true,212 resources: {basic?: any, composable?: any, slot?: any}[] | null = null,213): Promise<number> {214 let nftId = 0;215 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;216 const issuer = privateKey(issuerUri, Number(ss58Format));217 const owner = ownerUri ? privateKey(ownerUri, Number(ss58Format)).address : null;218 const recipient = recipientUri ? privateKey(recipientUri, Number(ss58Format)).address : null;219 const royaltyOptional = royalty ? royalty.toString() : null;220221 const actualOwnerUri = ownerUri ? ownerUri : issuerUri;222 const actualOwnerAddress = ownerUri ? owner : issuer.address;223224 const collectionOpt = await getCollection(api, collectionId);225226 const tx = api.tx.rmrkCore.mintNft(227 owner,228 collectionId,229 recipient,230 royaltyOptional,231 metadata,232 transferable,233 resources,234 );235236 const events = await executeTransaction(api, issuer, tx);237 const nftResult = extractRmrkCoreTxResult(events, 'NftMinted', (data) => {238 return parseInt(data[2].toString(), 10);239 });240241 expect(nftResult.success, 'Error: Unable to mint NFT').to.be.true;242243 const newCollectionNftsCount = (await getCollection(api, collectionId))244 .unwrap()245 .nftsCount246 .toNumber();247248 const oldCollectionNftsCount = collectionOpt249 .unwrap()250 .nftsCount.toNumber();251252 expect(newCollectionNftsCount, 'Error: NFTs count should increase')253 .to.be.equal(oldCollectionNftsCount + 1);254255 nftId = nftResult.successData!;256257 const nftOption = await getNft(api, collectionId, nftId);258259 expect(nftOption.isSome, 'Error: Unable to fetch created NFT').to.be.true;260261 const nft = nftOption.unwrap();262263 expect(nft.owner.isAccountId, 'Error: NFT owner should be some user').to.be.true;264 expect(nft.owner.asAccountId.toString()).to.be.equal(actualOwnerAddress, 'Error: Invalid NFT owner');265266 const isOwnedInUniques = await isNftOwnedBy(api, actualOwnerUri, collectionId, nftId);267 expect(isOwnedInUniques, `Error: created NFT is not actually owned by ${ownerUri}`)268 .to.be.true;269270 if (recipient === null && royalty === null) {271 expect(nft.royalty.isNone, 'Error: Invalid NFT recipient')272 .to.be.true;273 } else {274 expect(nft.royalty.isSome, 'Error: NFT royalty not found')275 .to.be.true;276277 const nftRoyalty = nft.royalty.unwrap();278 expect(nftRoyalty.recipient.eq(recipient), 'Error: Invalid NFT recipient')279 .to.be.true;280281 expect(nftRoyalty.amount.eq(royalty), 'Error: Invalid NFT royalty')282 .to.be.true;283 }284285 expect(nft.metadata.toUtf8()).to.be.equal(metadata, 'Error: Invalid NFT metadata');286 287 const nftResources = await getResources(api, collectionId, nftId);288 if (resources == null) {289 expect(nftResources, 'Error: Invalid NFT resources').to.be.empty;290 } else {291 expect(nftResources.length).to.be.equal(resources.length);292293 for (let i = 0; i < resources.length; i++) {294 let successFindingResource = false;295 const resource = resources[i];296 // try to find the matching resource from the query297 for (let j = 0; j < nftResources.length && !successFindingResource; j++) {298 const nftResourceData = nftResources[j].toHuman();299 expect(300 Object.prototype.hasOwnProperty.call(nftResourceData, 'resource'),301 `Error: Corrupted resource data on resource #${i}`,302 ).to.be.true;303 const nftResource = nftResourceData.resource!;304 type NftResourceKey = keyof typeof nftResource;305306 let typedResource = null;307 let typedNftResource = null;308309 if (resource.basic && Object.prototype.hasOwnProperty.call(nftResource, 'Basic')) {310 typedResource = resource.basic!;311 typedNftResource = nftResource['Basic' as NftResourceKey]!;312 } else if (resource.composable && Object.prototype.hasOwnProperty.call(nftResource, 'Composable')) {313 typedResource = resource.composable!;314 typedNftResource = nftResource['Composable' as NftResourceKey]! as any;315 if (typedResource.parts != undefined && typedResource.parts.toString() != typedNftResource.parts.toString()316 || typedResource.base != typedNftResource.base && typedResource.base != undefined) {317 continue;318 }319 } else if (resource.slot && Object.prototype.hasOwnProperty.call(nftResource, 'Slot')) {320 typedResource = resource.slot!;321 typedNftResource = nftResource['Slot' as NftResourceKey]! as any;322 if (typedResource.slot != typedNftResource.slot && typedResource.slot != undefined 323 || typedResource.base != typedNftResource.base && typedResource.base != undefined) {324 continue;325 }326 } else {327 continue;328 }329330 if (typedResource.src != typedNftResource.src 331 || typedResource.metadata != typedNftResource.metadata 332 || typedResource.thumb != typedNftResource.thumb333 || typedResource.license != typedNftResource.license334 ) {335 continue;336 }337338 // do final checks since this is now established to be the resource we seek339 expect(nftResourceData.pending, `Error: Resource #${i} is pending`).to.be.false;340 expect(nftResourceData.pendingRemoval, `Error: Resource #${i} is pending removal`).to.be.false;341342 // remove the matching resource from the resources we check343 nftResources.splice(j, 1);344 successFindingResource = true;345 }346347 expect(successFindingResource, `Error: Couldn't find resource #${i}'s counterpart among the returned`).to.be.true;348 }349 }350351 return nftId;352}353354export async function sendNft(355 api: ApiPromise,356 expectedStatus: 'pending' | 'sent',357 originalOwnerUri: string,358 collectionId: number,359 nftId: number,360 newOwner: string | NftIdTuple,361) {362 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;363 const originalOwner = privateKey(originalOwnerUri, Number(ss58Format));364 const newOwnerObj = makeNftOwner(api, newOwner);365366 const nftBeforeSendingOpt = await getNft(api, collectionId, nftId);367368 const tx = api.tx.rmrkCore.send(collectionId, nftId, newOwnerObj);369 const events = await executeTransaction(api, originalOwner, tx);370371 const sendResult = extractRmrkCoreTxResult(events, 'NFTSent', (data) => {372 return {373 dstOwner: data[1] as NftOwner,374 collectionId: parseInt(data[2].toString(), 10),375 nftId: parseInt(data[3].toString(), 10),376 };377 });378379 expect(sendResult.success, 'Error: Unable to send NFT').to.be.true;380 const sendData = sendResult.successData!;381382 expect(sendData.dstOwner.eq(newOwnerObj), 'Error: Invalid target user (from event data)')383 .to.be.true;384385 expect(sendData.collectionId)386 .to.be.equal(collectionId, 'Error: Invalid collection ID (from event data)');387388 expect(sendData.nftId).to.be.equal(nftId, 'Error: Invalid NFT ID (from event data)');389390 expect(nftBeforeSendingOpt.isSome, 'Error: Unable to fetch NFT before sending').to.be.true;391392 const nftBeforeSending = nftBeforeSendingOpt.unwrap();393394 const nftAfterSendingOpt = await getNft(api, collectionId, nftId);395396 expect(nftAfterSendingOpt.isSome, 'Error: Unable to fetch NFT after sending').to.be.true;397398 const nftAfterSending = nftAfterSendingOpt.unwrap();399400 const isOwnedByNewOwner = await isNftOwnedBy(api, newOwner, collectionId, nftId);401 const isPending = expectedStatus === 'pending';402403 expect(404 isOwnedByNewOwner,405 `Error: The NFT should be owned by ${newOwner.toString()}`,406 ).to.be.true;407408 expect(nftAfterSending.royalty.eq(nftBeforeSending.royalty), 'Error: Invalid NFT royalty after sending')409 .to.be.true;410411 expect(nftAfterSending.metadata.eq(nftBeforeSending.metadata), 'Error: Invalid NFT metadata after sending')412 .to.be.true;413414 expect(nftAfterSending.equipped.eq(nftBeforeSending.equipped), 'Error: Invalid NFT equipped status after sending')415 .to.be.true;416417 expect(nftAfterSending.pending.eq(isPending), 'Error: Invalid NFT pending state')418 .to.be.true;419}420421export async function acceptNft(422 api: ApiPromise,423 issuerUri: string,424 collectionId: number,425 nftId: number,426 newOwner: string | [number, number],427) {428 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;429 const issuer = privateKey(issuerUri, Number(ss58Format));430 const newOwnerObj = makeNftOwner(api, newOwner);431432 const nftBeforeOpt = await getNft(api, collectionId, nftId);433434 const tx = api.tx.rmrkCore.acceptNft(collectionId, nftId, newOwnerObj);435 const events = await executeTransaction(api, issuer, tx);436437 const acceptResult = extractRmrkCoreTxResult(events, 'NFTAccepted', (data) => {438 return {439 recipient: data[1] as NftOwner,440 collectionId: parseInt(data[2].toString(), 10),441 nftId: parseInt(data[3].toString(), 10),442 };443 });444445 expect(acceptResult.success, 'Error: Unable to accept NFT').to.be.true;446 const acceptData = acceptResult.successData!;447448 expect(acceptData.recipient.eq(newOwnerObj), 'Error: Invalid NFT recipient (from event data)')449 .to.be.true;450451 expect(acceptData.collectionId)452 .to.be.equal(collectionId, 'Error: Invalid collection ID (from event data)');453454 expect(acceptData.nftId)455 .to.be.equal(nftId, 'Error: Invalid NFT ID (from event data)');456457 const nftBefore = nftBeforeOpt.unwrap();458459 const isPendingBeforeAccept = nftBefore.pending.isTrue;460461 const nftAfter = (await getNft(api, collectionId, nftId)).unwrap();462 const isPendingAfterAccept = nftAfter.pending.isTrue;463464 expect(isPendingBeforeAccept, 'Error: NFT should be pending to be accepted')465 .to.be.true;466467 expect(isPendingAfterAccept, 'Error: NFT should NOT be pending after accept')468 .to.be.false;469470 const isOwnedInUniques = await isNftOwnedBy(api, newOwner, collectionId, nftId);471 expect(isOwnedInUniques, `Error: created NFT is not actually owned by ${newOwner.toString()}`)472 .to.be.true;473}474475export async function rejectNft(476 api: ApiPromise,477 issuerUri: string,478 collectionId: number,479 nftId: number,480) {481 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;482 const issuer = privateKey(issuerUri, Number(ss58Format));483 const nftBeforeOpt = await getNft(api, collectionId, nftId);484485 const tx = api.tx.rmrkCore.rejectNft(collectionId, nftId);486 const events = await executeTransaction(api, issuer, tx);487 const rejectResult = extractRmrkCoreTxResult(events, 'NFTRejected', (data) => {488 return {489 collectionId: parseInt(data[1].toString(), 10),490 nftId: parseInt(data[2].toString(), 10),491 };492 });493494 const rejectData = rejectResult.successData!;495496 expect(rejectData.collectionId)497 .to.be.equal(collectionId, 'Error: Invalid collection ID (from event data)');498499 expect(rejectData.nftId)500 .to.be.equal(nftId, 'Error: Invalid NFT ID (from event data)');501502 const nftBefore = nftBeforeOpt.unwrap();503504 const isPendingBeforeReject = nftBefore.pending.isTrue;505506 const nftAfter = await getNft(api, collectionId, nftId);507508 expect(isPendingBeforeReject, 'Error: NFT should be pending to be rejected')509 .to.be.true;510511 expect(nftAfter.isNone, 'Error: NFT should be burned after reject')512 .to.be.true;513}514515export async function createBase(516 api: ApiPromise,517 issuerUri: string,518 baseType: string,519 symbol: string,520 parts: object[],521): Promise<number> {522 let baseId = 0;523 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;524 const issuer = privateKey(issuerUri, Number(ss58Format));525526 const partTypes = api.createType('Vec<RmrkTraitsPartPartType>', parts) as Vec<PartType>;527528 const tx = api.tx.rmrkEquip.createBase(baseType, symbol, partTypes);529 const events = await executeTransaction(api, issuer, tx);530531 const baseResult = extractRmrkEquipTxResult(events, 'BaseCreated', (data) => {532 return parseInt(data[1].toString(), 10);533 });534535 expect(baseResult.success, 'Error: Unable to create Base')536 .to.be.true;537538 baseId = baseResult.successData!;539 const baseOptional = await getBase(api, baseId);540541 expect(baseOptional.isSome, 'Error: Unable to fetch created Base')542 .to.be.true;543544 const base = baseOptional.unwrap();545 const baseParts = await getParts(api, baseId);546547 expect(base.issuer.toString()).to.be.equal(issuer.address, 'Error: Invalid Base issuer');548 expect(base.baseType.toUtf8()).to.be.equal(baseType, 'Error: Invalid Base type');549 expect(base.symbol.toUtf8()).to.be.equal(symbol, 'Error: Invalid Base symbol');550 expect(partTypes.eq(baseParts), 'Error: Received invalid base parts').to.be.true;551552 return baseId;553}554555export async function setResourcePriorities(556 api: ApiPromise,557 issuerUri: string,558 collectionId: number,559 nftId: number,560 priorities: number[],561) {562 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;563 const issuer = privateKey(issuerUri, Number(ss58Format));564565 const prioritiesVec = api.createType('Vec<u32>', priorities);566 const tx = api.tx.rmrkCore.setPriority(collectionId, nftId, prioritiesVec);567 const events = await executeTransaction(api, issuer, tx);568569 const prioResult = extractRmrkCoreTxResult(events, 'PrioritySet', (data) => {570 return {571 collectionId: parseInt(data[0].toString(), 10),572 nftId: parseInt(data[1].toString(), 10),573 };574 });575576 expect(prioResult.success, 'Error: Unable to set resource priorities').to.be.true;577 const eventData = prioResult.successData!;578579 expect(eventData.collectionId)580 .to.be.equal(collectionId, 'Error: Invalid collection ID (set priorities event data)');581582 expect(eventData.nftId).to.be.equal(nftId, 'Error: Invalid NFT ID (set priorities event data');583584 for (let i = 0; i < priorities.length; i++) {585 const resourceId = priorities[i];586587 const fetchedPrio = await getResourcePriority(api, collectionId, nftId, resourceId);588 expect(fetchedPrio).to.be.equal(i, 'Error: Invalid priorities are set');589 }590591}592593export async function setEquippableList(594 api: ApiPromise,595 issuerUri: string,596 baseId: number,597 slotId: number,598 equippableList: 'All' | 'Empty' | { 'Custom': number[] },599) {600 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;601 const issuer = privateKey(issuerUri, Number(ss58Format));602 const equippable = api.createType('RmrkTraitsPartEquippableList', equippableList) as EquippableList;603604 const tx = api.tx.rmrkEquip.equippable(baseId, slotId, equippable);605 const events = await executeTransaction(api, issuer, tx);606607 const equipListResult = extractRmrkEquipTxResult(events, 'EquippablesUpdated', (data) => {608 return {609 baseId: parseInt(data[0].toString(), 10),610 slotId: parseInt(data[1].toString(), 10),611 };612 });613614 expect(equipListResult.success, 'Error: unable to update equippable list').to.be.true;615 const updateEvent = equipListResult.successData!;616617 expect(updateEvent.baseId)618 .to.be.equal(baseId, 'Error: invalid base ID from update equippable event');619620 expect(updateEvent.slotId)621 .to.be.equal(slotId, 'Error: invalid base ID from update equippable event');622623 const fetchedEquippableList = await getEquippableList(api, baseId, slotId);624625 expect(fetchedEquippableList, 'Error: unable to fetch equippable list').to.be.not.null;626 if (fetchedEquippableList) {627 expect(fetchedEquippableList)628 .to.be.deep.equal(equippableList, 'Error: invalid equippable list was set');629 }630}631632export async function addTheme(633 api: ApiPromise,634 issuerUri: string,635 baseId: number,636 themeObj: object,637 filterKeys: string[] | null = null,638) {639 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;640 const issuer = privateKey(issuerUri, Number(ss58Format));641 const theme = api.createType('RmrkTraitsTheme', themeObj) as Theme;642643 const tx = api.tx.rmrkEquip.themeAdd(baseId, theme);644 const events = await executeTransaction(api, issuer, tx);645646 expect(isTxResultSuccess(events), 'Error: Unable to add Theme').to.be.true;647648 const fetchedThemeOpt = await getTheme(api, baseId, theme.name.toUtf8(), null);649650 expect(fetchedThemeOpt.isSome, 'Error: Unable to fetch theme').to.be.true;651652 const fetchedTheme = fetchedThemeOpt.unwrap();653654 expect(theme.name.eq(fetchedTheme.name), 'Error: Invalid theme name').to.be.true;655656 for (let i = 0; i < theme.properties.length; i++) {657 const property = theme.properties[i];658 const propertyKey = property.key.toUtf8();659660 const propertyFoundCount = fetchedTheme.properties.filter((fetchedProp) => property.key.eq(fetchedProp.key)).length;661662 expect(propertyFoundCount > 1, `Error: Too many properties with key ${propertyKey} found`)663 .to.be.false;664665 if (filterKeys) {666 const isFiltered = fetchedTheme.properties.find((fetchedProp) => fetchedProp.key.eq(property.key)) === undefined;667668 if (isFiltered) {669 expect(propertyFoundCount === 0, `Error: Unexpected filtered key ${propertyKey}`)670 .to.be.true;671 continue;672 }673 }674675 expect(propertyFoundCount === 1, `Error: The property with key ${propertyKey} is not found`)676 .to.be.true;677 }678}679680export async function lockCollection(681 api: ApiPromise,682 issuerUri: string,683 collectionId: number,684 max = 0,685) {686 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;687 const issuer = privateKey(issuerUri, Number(ss58Format));688 const tx = api.tx.rmrkCore.lockCollection(collectionId);689 const events = await executeTransaction(api, issuer, tx);690 const lockResult = extractRmrkCoreTxResult(events, 'CollectionLocked', (data) => {691 return parseInt(data[1].toString(), 10);692 });693 expect(lockResult.success, 'Error: Unable to lock a collection').to.be.true;694 expect(lockResult.successData!, 'Error: Invalid collection was locked')695 .to.be.eq(collectionId);696697 await getCollection(api, collectionId).then((collectionOption) => {698 const collection = collectionOption.unwrap();699 expect(collection.max.unwrap().toNumber()).to.be.equal(max);700 });701}702703export async function setPropertyCollection(704 api: ApiPromise,705 issuerUri: string,706 collectionId: number,707 key: string,708 value: string,709) {710 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;711 const alice = privateKey(issuerUri, Number(ss58Format));712713 const tx = api.tx.rmrkCore.setProperty(collectionId, null, key, value);714 const events = await executeTransaction(api, alice, tx);715 const propResult = extractRmrkCoreTxResult(events, 'PropertySet', (data) => {716 return {717 collectionId: parseInt(data[0].toString(), 10),718 nftId: data[1] as Option<u32>,719 key: data[2] as Bytes,720 value: data[3] as Bytes,721 };722 });723724 expect(propResult.success, 'Error: Unable to set collection property').to.be.true;725 const eventData = propResult.successData!;726 const eventDescription = 'from set collection property event';727728 expect(eventData.collectionId, 'Error: Invalid collection ID ' + eventDescription)729 .to.be.equal(collectionId);730731 expect(eventData.nftId.eq(null), 'Error: Unexpected NFT ID ' + eventDescription)732 .to.be.true;733734 expect(eventData.key.eq(key), 'Error: Invalid property key ' + eventDescription)735 .to.be.true;736737 expect(eventData.value.eq(value), 'Error: Invalid property value ' + eventDescription)738 .to.be.true;739740 expect(await isCollectionPropertyExists(api, collectionId, key, value))741 .to.be.true;742}743744export async function burnNft(745 api: ApiPromise,746 issuerUri: string,747 collectionId: number,748 nftId: number,749) {750 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;751 const issuer = privateKey(issuerUri, Number(ss58Format));752 const maxBurns = 10;753 const tx = api.tx.rmrkCore.burnNft(collectionId, nftId, maxBurns);754 const events = await executeTransaction(api, issuer, tx);755 const burnResult = extractRmrkCoreTxResult(events, 'NFTBurned', (data) => {756 return parseInt(data[1].toString(), 10);757 });758759 expect(burnResult.success, 'Error: Unable to burn an NFT').to.be.true;760 expect(burnResult.successData!, 'Error: Invalid NFT was burned')761 .to.be.eq(nftId);762763 const nftBurned = await getNft(api, collectionId, nftId);764 expect(nftBurned.isSome).to.be.false;765}766767export async function acceptNftResource(768 api: ApiPromise,769 issuerUri: string,770 collectionId: number,771 nftId: number,772 resourceId: number,773) {774 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;775 const issuer = privateKey(issuerUri, Number(ss58Format));776777 const tx = api.tx.rmrkCore.acceptResource(778 collectionId,779 nftId,780 resourceId,781 );782783 const events = await executeTransaction(api, issuer, tx);784 const acceptResult = extractRmrkCoreTxResult(events, 'ResourceAccepted', (data) => {785 return {786 nftId: parseInt(data[0].toString(), 10),787 resourceId: parseInt(data[1].toString(), 10),788 };789 });790791 expect(acceptResult.success, 'Error: Unable to accept a resource').to.be.true;792 expect(acceptResult.successData!.nftId, 'Error: Invalid NFT ID while accepting a resource')793 .to.be.eq(nftId);794 expect(acceptResult.successData!.resourceId, 'Error: Invalid resource ID while accepting a resource')795 .to.be.eq(resourceId);796797 const resource = await getResourceById(api, collectionId, nftId, resourceId);798 checkResourceStatus(resource, 'added');799}800801async function executeResourceCreation(802 api: ApiPromise,803 issuer: IKeyringPair,804 tx: any,805 collectionId: number,806 nftId: number,807 expectedStatus: 'pending' | 'added',808): Promise<ResourceInfo> {809 const events = await executeTransaction(api, issuer, tx);810811 const resourceResult = extractRmrkCoreTxResult(events, 'ResourceAdded', (data) => {812 return parseInt(data[1].toString(), 10);813 });814 expect(resourceResult.success, 'Error: Unable to add resource').to.be.true;815 const resourceId = resourceResult.successData!;816817 const resource = await getResourceById(api, collectionId, nftId, resourceId);818 checkResourceStatus(resource, expectedStatus);819820 return resource;821}822823export async function addNftBasicResource(824 api: ApiPromise,825 issuerUri: string,826 expectedStatus: 'pending' | 'added',827 collectionId: number,828 nftId: number,829 src: string | null,830 metadata: string | null,831 license: string | null,832 thumb: string | null,833): Promise<number> {834 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;835 const issuer = privateKey(issuerUri, Number(ss58Format));836837 const basicResource = api.createType('RmrkTraitsResourceBasicResource', {838 src: src,839 metadata: metadata,840 license: license,841 thumb: thumb,842 }) as BasicResource;843844 const tx = api.tx.rmrkCore.addBasicResource(845 collectionId,846 nftId,847 basicResource,848 );849850 const resource = await executeResourceCreation(api, issuer, tx, collectionId, nftId, expectedStatus);851852 // FIXME A workaround. It seems it is a PolkadotJS bug.853 // All of the following are `false`.854 //855 // console.log('>>> basic:', resource.resource.isBasic);856 // console.log('>>> composable:', resource.resource.isComposable);857 // console.log('>>> slot:', resource.resource.isSlot);858 const resourceJson = resource.resource.toHuman() as any;859860 expect(Object.prototype.hasOwnProperty.call(resourceJson, 'Basic'), 'Error: Expected basic resource type')861 .to.be.true;862863 const recvBasicRes = resourceJson['Basic'];864865 expect(recvBasicRes.src, 'Error: Invalid basic resource src')866 .to.be.eq(src);867 expect(recvBasicRes.metadata, 'Error: basic first resource metadata')868 .to.be.eq(metadata);869 expect(recvBasicRes.license, 'Error: basic first resource license')870 .to.be.eq(license);871 expect(recvBasicRes.thumb, 'Error: basic first resource thumb')872 .to.be.eq(thumb);873874 return resource.id.toNumber();875}876877export async function addNftComposableResource(878 api: ApiPromise,879 issuerUri: string,880 expectedStatus: 'pending' | 'added',881 collectionId: number,882 nftId: number,883 parts: number[],884 baseId: number,885 src: string | null,886 metadata: string | null,887 license: string | null,888 thumb: string | null,889): Promise<number> {890 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;891 const issuer = privateKey(issuerUri, Number(ss58Format));892893 const composableResource = api.createType('RmrkTraitsResourceComposableResource', {894 parts: parts, // api.createType('Vec<u32>', parts),895 base: baseId,896 src: src,897 metadata: metadata,898 license: license,899 thumb: thumb,900 }) as ComposableResource;901902 const tx = api.tx.rmrkCore.addComposableResource(903 collectionId,904 nftId,905 composableResource,906 );907908 const resource = await executeResourceCreation(api, issuer, tx, collectionId, nftId, expectedStatus);909910 // FIXME A workaround. It seems it is a PolkadotJS bug.911 // All of the following are `false`.912 //913 // console.log('>>> basic:', resource.resource.isBasic);914 // console.log('>>> composable:', resource.resource.isComposable);915 // console.log('>>> slot:', resource.resource.isSlot);916 const resourceJson = resource.resource.toHuman() as any;917918 expect(Object.prototype.hasOwnProperty.call(resourceJson, 'Composable'), 'Error: Expected composable resource type')919 .to.be.true;920921 const recvComposableRes = resourceJson['Composable'];922923 expect(recvComposableRes.parts.toString(), 'Error: Invalid composable resource parts')924 .to.be.eq(parts.toString());925 expect(recvComposableRes.base, 'Error: Invalid composable resource base id')926 .to.be.eq(baseId.toString());927 expect(recvComposableRes.src, 'Error: Invalid composable resource src')928 .to.be.eq(src);929 expect(recvComposableRes.metadata, 'Error: Invalid composable resource metadata')930 .to.be.eq(metadata);931 expect(recvComposableRes.license, 'Error: Invalid composable resource license')932 .to.be.eq(license);933 expect(recvComposableRes.thumb, 'Error: Invalid composable resource thumb')934 .to.be.eq(thumb);935936 return resource.id.toNumber();937}938939export async function addNftSlotResource(940 api: ApiPromise,941 issuerUri: string,942 expectedStatus: 'pending' | 'added',943 collectionId: number,944 nftId: number,945 baseId: number,946 slotId: number,947 src: string | null,948 metadata: string | null,949 license: string | null,950 thumb: string | null,951): Promise<number> {952 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;953 const issuer = privateKey(issuerUri, Number(ss58Format));954955 const slotResource = api.createType('RmrkTraitsResourceSlotResource', {956 base: baseId,957 src: src,958 metadata,959 slot: slotId,960 license: license,961 thumb: thumb,962 }) as SlotResource;963964 const tx = api.tx.rmrkCore.addSlotResource(965 collectionId,966 nftId,967 slotResource,968 );969970 const resource = await executeResourceCreation(api, issuer, tx, collectionId, nftId, expectedStatus);971972 // FIXME A workaround. It seems it is a PolkadotJS bug.973 // All of the following are `false`.974 //975 // console.log('>>> basic:', resource.resource.isBasic);976 // console.log('>>> composable:', resource.resource.isComposable);977 // console.log('>>> slot:', resource.resource.isSlot);978 const resourceJson = resource.resource.toHuman() as any;979980 expect(Object.prototype.hasOwnProperty.call(resourceJson, 'Slot'), 'Error: Expected slot resource type')981 .to.be.true;982983 const recvSlotRes = resourceJson['Slot'];984985 expect(recvSlotRes.base, 'Error: Invalid slot resource base id')986 .to.be.eq(baseId.toString());987 expect(recvSlotRes.slot, 'Error: Invalid slot resource slot id')988 .to.be.eq(slotId.toString());989 expect(recvSlotRes.src, 'Error: Invalid slot resource src')990 .to.be.eq(src);991 expect(recvSlotRes.metadata, 'Error: Invalid slot resource metadata')992 .to.be.eq(metadata);993 expect(recvSlotRes.license, 'Error: Invalid slot resource license')994 .to.be.eq(license);995 expect(recvSlotRes.thumb, 'Error: Invalid slot resource thumb')996 .to.be.eq(thumb);997998 return resource.id.toNumber();999}10001001export async function equipNft(1002 api: ApiPromise,1003 issuerUri: string,1004 item: NftIdTuple,1005 equipper: NftIdTuple,1006 resource: number,1007 base: number,1008 slot: number,1009) {1010 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;1011 const issuer = privateKey(issuerUri, Number(ss58Format));1012 const tx = api.tx.rmrkEquip.equip(item, equipper, resource, base, slot);1013 const events = await executeTransaction(api, issuer, tx);1014 const equipResult = extractRmrkEquipTxResult(events, 'SlotEquipped', (data) => {1015 return {1016 item_collection: parseInt(data[0].toString(), 10),1017 item_nft: parseInt(data[1].toString(), 10),1018 base_id: parseInt(data[2].toString(), 10),1019 slot_id: parseInt(data[3].toString(), 10),1020 };1021 });1022 expect(equipResult.success, 'Error: Unable to equip an item').to.be.true;1023 expect(equipResult.successData!.item_collection, 'Error: Invalid item collection id')1024 .to.be.eq(item[0]);1025 expect(equipResult.successData!.item_nft, 'Error: Invalid item NFT id')1026 .to.be.eq(item[1]);1027 expect(equipResult.successData!.base_id, 'Error: Invalid base id')1028 .to.be.eq(base);1029 expect(equipResult.successData!.slot_id, 'Error: Invalid slot id')1030 .to.be.eq(slot);1031}10321033export async function unequipNft(1034 api: ApiPromise,1035 issuerUri: string,1036 item: any,1037 equipper: any,1038 resource: number,1039 base: number,1040 slot: number,1041) {1042 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;1043 const issuer = privateKey(issuerUri, Number(ss58Format));1044 const tx = api.tx.rmrkEquip.equip(item, equipper, resource, base, slot);1045 const events = await executeTransaction(api, issuer, tx);10461047 const unEquipResult = extractRmrkEquipTxResult(1048 events,1049 'SlotUnequipped',1050 (data) => {1051 return {1052 item_collection: parseInt(data[0].toString(), 10),1053 item_nft: parseInt(data[1].toString(), 10),1054 base_id: parseInt(data[2].toString(), 10),1055 slot_id: parseInt(data[3].toString(), 10),1056 };1057 },1058 );10591060 expect(unEquipResult.success, 'Error: Unable to unequip an item').to.be.true;1061 expect(unEquipResult.successData!.item_collection, 'Error: Invalid item collection id')1062 .to.be.eq(item[0]);1063 expect(unEquipResult.successData!.item_nft, 'Error: Invalid item NFT id')1064 .to.be.eq(item[1]);1065 expect(unEquipResult.successData!.base_id, 'Error: Invalid base id')1066 .to.be.eq(base);1067 expect(unEquipResult.successData!.slot_id, 'Error: Invalid slot id')1068 .to.be.eq(slot);1069}10701071export async function removeNftResource(1072 api: ApiPromise,1073 expectedStatus: 'pending' | 'removed',1074 issuerUri: string,1075 collectionId: number,1076 nftId: number,1077 resourceId: number,1078) {1079 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;1080 const issuer = privateKey(issuerUri, Number(ss58Format));10811082 const tx = api.tx.rmrkCore.removeResource(collectionId, nftId, resourceId);1083 const events = await executeTransaction(api, issuer, tx);1084 const removeResult = extractRmrkCoreTxResult(events, 'ResourceRemoval', (data) => {1085 return {1086 nftId: parseInt(data[0].toString(), 10),1087 resourceId: parseInt(data[1].toString(), 10),1088 };1089 });1090 expect(removeResult.success, 'Error: Unable to remove a resource').to.be.true;1091 expect(removeResult.successData!.nftId, 'Error: Invalid NFT Id while removing a resource')1092 .to.be.eq(nftId);1093 expect(removeResult.successData!.resourceId, 'Error: Invalid resource Id while removing a resource')1094 .to.be.eq(resourceId);10951096 const afterDeleting = await findResourceById(api, collectionId, nftId, resourceId);10971098 if (expectedStatus === 'pending') {1099 expect(afterDeleting).not.to.be.null;1100 expect(afterDeleting?.pendingRemoval.isTrue).to.be.equal(true);1101 } else {1102 expect(afterDeleting).to.be.null;1103 }1104}11051106export async function acceptResourceRemoval(1107 api: ApiPromise,1108 issuerUri: string,1109 collectionId: number,1110 nftId: number,1111 resourceId: number,1112) {1113 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;1114 const issuer = privateKey(issuerUri, Number(ss58Format));11151116 const tx = api.tx.rmrkCore.acceptResourceRemoval(collectionId, nftId, resourceId);1117 const events = await executeTransaction(api, issuer, tx);1118 const acceptResult = extractRmrkCoreTxResult(events, 'ResourceRemovalAccepted', (data) => {1119 return {1120 nftId: parseInt(data[0].toString(), 10),1121 resourceId: parseInt(data[1].toString(), 10),1122 };1123 });1124 expect(acceptResult.success, 'Error: Unable to accept a resource').to.be.true;1125 expect(acceptResult.successData!.nftId, 'Error: Invalid NFT Id while accepting a resource')1126 .to.be.eq(nftId);1127 expect(acceptResult.successData!.resourceId, 'Error: Invalid resource Id while accepting a resource')1128 .to.be.eq(resourceId);11291130 const afterDeleting = await findResourceById(api, collectionId, nftId, resourceId);1131 expect(afterDeleting, 'Error: resource deleting failed').to.be.null;1132}1import {ApiPromise} from '@polkadot/api';2import {Bytes, Option, u32, Vec} from '@polkadot/types-codec';3import {4 RmrkTraitsNftAccountIdOrCollectionNftTuple as NftOwner, RmrkTraitsPartEquippableList as EquippableList,5 RmrkTraitsPartPartType as PartType, RmrkTraitsResourceBasicResource as BasicResource,6 RmrkTraitsResourceComposableResource as ComposableResource, RmrkTraitsResourceResourceInfo as ResourceInfo, RmrkTraitsResourceSlotResource as SlotResource, RmrkTraitsTheme as Theme,7} from '@polkadot/types/lookup';8import {IKeyringPair} from '@polkadot/types/types';9import chai from 'chai';10import chaiAsPromised from 'chai-as-promised';11import '../../interfaces/augment-api';12import privateKey from '../../substrate/privateKey';13import {executeTransaction} from '../../substrate/substrate-api';14import {15 getBase,16 getCollection,17 getCollectionsCount,18 getEquippableList,19 getNft,20 getParts,21 getResources, 22 getResourcePriority, 23 getTheme,24 NftIdTuple,25} from './fetch';26import {27 extractRmrkCoreTxResult,28 extractRmrkEquipTxResult, isCollectionPropertyExists, isNftOwnedBy, isNftPropertyExists, isTxResultSuccess, makeNftOwner,29 findResourceById, getResourceById, checkResourceStatus,30} from './helpers';3132chai.use(chaiAsPromised);33const expect = chai.expect;3435export async function createCollection(36 api: ApiPromise,37 issuerUri: string,38 metadata: string,39 max: number | null,40 symbol: string,41): Promise<number> {42 let collectionId = 0;4344 const oldCollectionCount = await getCollectionsCount(api);45 const maxOptional = max ? max.toString() : null;46 const ss58Format = (api.registry.getChainProperties())!.toJSON().ss58Format;47 const issuer = privateKey(issuerUri, Number(ss58Format));48 const tx = api.tx.rmrkCore.createCollection(metadata, maxOptional, symbol);49 const events = await executeTransaction(api, issuer, tx);5051 const collectionResult = extractRmrkCoreTxResult(events, 'CollectionCreated', (data) => {52 return parseInt(data[1].toString(), 10);53 });54 expect(collectionResult.success, 'Error: unable to create a collection').to.be.true;5556 collectionId = collectionResult.successData!;5758 const newCollectionCount = await getCollectionsCount(api);59 const collectionOption = await getCollection(api, collectionId);6061 expect(newCollectionCount).to.be.equal(oldCollectionCount + 1, 'Error: NFT collection count should increase');62 expect(collectionOption.isSome, 'Error: unable to fetch created NFT collection').to.be.true;6364 const collection = collectionOption.unwrap();6566 expect(collection.metadata.toUtf8()).to.be.equal(metadata, 'Error: Invalid NFT collection metadata');67 expect(collection.max.isSome).to.be.equal(max !== null, 'Error: Invalid NFT collection max');6869 if (collection.max.isSome) {70 expect(collection.max.unwrap().toNumber()).to.be.equal(max, 'Error: Invalid NFT collection max');71 }72 expect(collection.symbol.toUtf8()).to.be.equal(symbol, "Error: Invalid NFT collection's symbol");73 expect(collection.nftsCount.toNumber()).to.be.equal(0, "Error: NFT collection shoudn't have any tokens");74 expect(collection.issuer.toString()).to.be.equal(issuer.address, 'Error: Invalid NFT collection issuer');7576 return collectionId;77}7879export async function changeIssuer(80 api: ApiPromise,81 issuerUri: string,82 collectionId: number,83 newIssuer: string,84) {85 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;86 const alice = privateKey(issuerUri, Number(ss58Format));87 const bob = privateKey(newIssuer, Number(ss58Format));8889 // This is only needed when RMRK uses `uniques` pallet by Parity90 // let tx = api.tx.uniques.setAcceptOwnership(91 // api.createType('Option<u32>', collectionId)92 // );93 // let events = await executeTransaction(api, bob, tx);94 // expect(isTxResultSuccess(events), 'Error: Unable to accept ownership').to.be.true;9596 const tx = api.tx.rmrkCore.changeCollectionIssuer(collectionId, bob.address);97 const events = await executeTransaction(api, alice, tx);98 const changeIssuerResult = extractRmrkCoreTxResult(events, 'IssuerChanged', (data) => {99 return parseInt(data[2].toString(), 10);100 });101 expect(changeIssuerResult.success, 'Error: Unable to change NFT collection issuer').to.be.true;102 expect(changeIssuerResult.successData!, 'Error: Invalid collection id after changing the issuer')103 .to.be.eq(collectionId);104105 await getCollection(api, collectionId).then((collectionOption) => {106 const collection = collectionOption.unwrap();107 expect(collection.issuer.toString())108 .to.be.deep.eq(bob.address, 'Error: Invalid NFT collection issuer');109 });110}111112export async function deleteCollection(113 api: ApiPromise,114 issuerUri: string,115 collectionId: string,116): Promise<number> {117 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;118 const issuer = privateKey(issuerUri, Number(ss58Format));119 const tx = api.tx.rmrkCore.destroyCollection(collectionId);120 const events = await executeTransaction(api, issuer, tx);121122 const collectionTxResult = extractRmrkCoreTxResult(123 events,124 'CollectionDestroy',125 (data) => {126 return parseInt(data[1].toString(), 10);127 },128 );129 expect(collectionTxResult.success, 'Error: Unable to delete NFT collection').to.be.true;130131 const collection = await getCollection(132 api,133 parseInt(collectionId, 10),134 );135 expect(collection.isEmpty, 'Error: NFT collection should be deleted').to.be.true;136137 return 0;138}139140export async function negativeDeleteCollection(141 api: ApiPromise,142 issuerUri: string,143 collectionId: string,144): Promise<number> {145 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;146 const issuer = privateKey(issuerUri, Number(ss58Format));147 const tx = api.tx.rmrkCore.destroyCollection(collectionId);148 await expect(executeTransaction(api, issuer, tx)).to.be.rejected;149150 return 0;151}152153export async function setNftProperty(154 api: ApiPromise,155 issuerUri: string,156 collectionId: number,157 nftId: number,158 key: string,159 value: string,160) {161 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;162 const issuer = privateKey(issuerUri, Number(ss58Format));163 const nftIdOpt = api.createType('Option<u32>', nftId);164 const tx = api.tx.rmrkCore.setProperty(165 collectionId,166 nftIdOpt,167 key,168 value,169 );170 const events = await executeTransaction(api, issuer, tx);171172 const propResult = extractRmrkCoreTxResult(events, 'PropertySet', (data) => {173 return {174 collectionId: parseInt(data[0].toString(), 10),175 nftId: data[1] as Option<u32>,176 key: data[2] as Bytes,177 value: data[3] as Bytes,178 };179 });180181 expect(propResult.success, 'Error: Unable to set NFT property').to.be.true;182 const eventData = propResult.successData!;183 const eventDescription = 'from set NFT property event';184185 expect(eventData.collectionId, 'Error: Invalid collection ID ' + eventDescription)186 .to.be.equal(collectionId);187188 expect(eventData.nftId.eq(nftIdOpt), 'Error: Invalid NFT ID ' + eventDescription)189 .to.be.true;190191 expect(eventData.key.eq(key), 'Error: Invalid property key ' + eventDescription)192 .to.be.true;193194 expect(eventData.value.eq(value), 'Error: Invalid property value ' + eventDescription)195 .to.be.true;196197 expect(198 await isNftPropertyExists(api, collectionId, nftId, key, value),199 'Error: NFT property is not found',200 ).to.be.true;201}202203export async function mintNft(204 api: ApiPromise,205 issuerUri: string,206 ownerUri: string | null,207 collectionId: number,208 metadata: string,209 recipientUri: string | null = null,210 royalty: number | null = null,211 transferable = true,212 resources: {basic?: any, composable?: any, slot?: any}[] | null = null,213): Promise<number> {214 let nftId = 0;215 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;216 const issuer = privateKey(issuerUri, Number(ss58Format));217 const owner = ownerUri ? privateKey(ownerUri, Number(ss58Format)).address : null;218 const recipient = recipientUri ? privateKey(recipientUri, Number(ss58Format)).address : null;219 const royaltyOptional = royalty ? royalty.toString() : null;220221 const actualOwnerUri = ownerUri ? ownerUri : issuerUri;222 const actualOwnerAddress = ownerUri ? owner : issuer.address;223224 const collectionOpt = await getCollection(api, collectionId);225226 const tx = api.tx.rmrkCore.mintNft(227 owner,228 collectionId,229 recipient,230 royaltyOptional,231 metadata,232 transferable,233 resources as any,234 );235236 const events = await executeTransaction(api, issuer, tx);237 const nftResult = extractRmrkCoreTxResult(events, 'NftMinted', (data) => {238 return parseInt(data[2].toString(), 10);239 });240241 expect(nftResult.success, 'Error: Unable to mint NFT').to.be.true;242243 const newCollectionNftsCount = (await getCollection(api, collectionId))244 .unwrap()245 .nftsCount246 .toNumber();247248 const oldCollectionNftsCount = collectionOpt249 .unwrap()250 .nftsCount.toNumber();251252 expect(newCollectionNftsCount, 'Error: NFTs count should increase')253 .to.be.equal(oldCollectionNftsCount + 1);254255 nftId = nftResult.successData!;256257 const nftOption = await getNft(api, collectionId, nftId);258259 expect(nftOption.isSome, 'Error: Unable to fetch created NFT').to.be.true;260261 const nft = nftOption.unwrap();262263 expect(nft.owner.isAccountId, 'Error: NFT owner should be some user').to.be.true;264 expect(nft.owner.asAccountId.toString()).to.be.equal(actualOwnerAddress, 'Error: Invalid NFT owner');265266 const isOwnedInUniques = await isNftOwnedBy(api, actualOwnerUri, collectionId, nftId);267 expect(isOwnedInUniques, `Error: created NFT is not actually owned by ${ownerUri}`)268 .to.be.true;269270 if (recipient === null && royalty === null) {271 expect(nft.royalty.isNone, 'Error: Invalid NFT recipient')272 .to.be.true;273 } else {274 expect(nft.royalty.isSome, 'Error: NFT royalty not found')275 .to.be.true;276277 const nftRoyalty = nft.royalty.unwrap();278 expect(nftRoyalty.recipient.eq(recipient), 'Error: Invalid NFT recipient')279 .to.be.true;280281 expect(nftRoyalty.amount.eq(royalty), 'Error: Invalid NFT royalty')282 .to.be.true;283 }284285 expect(nft.metadata.toUtf8()).to.be.equal(metadata, 'Error: Invalid NFT metadata');286 287 const nftResources = await getResources(api, collectionId, nftId);288 if (resources == null) {289 expect(nftResources, 'Error: Invalid NFT resources').to.be.empty;290 } else {291 expect(nftResources.length).to.be.equal(resources.length);292293 for (let i = 0; i < resources.length; i++) {294 let successFindingResource = false;295 const resource = resources[i];296 // try to find the matching resource from the query297 for (let j = 0; j < nftResources.length && !successFindingResource; j++) {298 const nftResourceData = nftResources[j].toHuman();299 expect(300 Object.prototype.hasOwnProperty.call(nftResourceData, 'resource'),301 `Error: Corrupted resource data on resource #${i}`,302 ).to.be.true;303 const nftResource = nftResourceData.resource!;304 type NftResourceKey = keyof typeof nftResource;305306 let typedResource = null;307 let typedNftResource = null;308309 if (resource.basic && Object.prototype.hasOwnProperty.call(nftResource, 'Basic')) {310 typedResource = resource.basic!;311 typedNftResource = nftResource['Basic' as NftResourceKey]!;312 } else if (resource.composable && Object.prototype.hasOwnProperty.call(nftResource, 'Composable')) {313 typedResource = resource.composable!;314 typedNftResource = nftResource['Composable' as NftResourceKey]! as any;315 if (typedResource.parts != undefined && typedResource.parts.toString() != typedNftResource.parts.toString()316 || typedResource.base != typedNftResource.base && typedResource.base != undefined) {317 continue;318 }319 } else if (resource.slot && Object.prototype.hasOwnProperty.call(nftResource, 'Slot')) {320 typedResource = resource.slot!;321 typedNftResource = nftResource['Slot' as NftResourceKey]! as any;322 if (typedResource.slot != typedNftResource.slot && typedResource.slot != undefined 323 || typedResource.base != typedNftResource.base && typedResource.base != undefined) {324 continue;325 }326 } else {327 continue;328 }329330 if (typedResource.src != typedNftResource.src 331 || typedResource.metadata != typedNftResource.metadata 332 || typedResource.thumb != typedNftResource.thumb333 || typedResource.license != typedNftResource.license334 ) {335 continue;336 }337338 // do final checks since this is now established to be the resource we seek339 expect(nftResourceData.pending, `Error: Resource #${i} is pending`).to.be.false;340 expect(nftResourceData.pendingRemoval, `Error: Resource #${i} is pending removal`).to.be.false;341342 // remove the matching resource from the resources we check343 nftResources.splice(j, 1);344 successFindingResource = true;345 }346347 expect(successFindingResource, `Error: Couldn't find resource #${i}'s counterpart among the returned`).to.be.true;348 }349 }350351 return nftId;352}353354export async function sendNft(355 api: ApiPromise,356 expectedStatus: 'pending' | 'sent',357 originalOwnerUri: string,358 collectionId: number,359 nftId: number,360 newOwner: string | NftIdTuple,361) {362 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;363 const originalOwner = privateKey(originalOwnerUri, Number(ss58Format));364 const newOwnerObj = makeNftOwner(api, newOwner);365366 const nftBeforeSendingOpt = await getNft(api, collectionId, nftId);367368 const tx = api.tx.rmrkCore.send(collectionId, nftId, newOwnerObj);369 const events = await executeTransaction(api, originalOwner, tx);370371 const sendResult = extractRmrkCoreTxResult(events, 'NFTSent', (data) => {372 return {373 dstOwner: data[1] as NftOwner,374 collectionId: parseInt(data[2].toString(), 10),375 nftId: parseInt(data[3].toString(), 10),376 };377 });378379 expect(sendResult.success, 'Error: Unable to send NFT').to.be.true;380 const sendData = sendResult.successData!;381382 expect(sendData.dstOwner.eq(newOwnerObj), 'Error: Invalid target user (from event data)')383 .to.be.true;384385 expect(sendData.collectionId)386 .to.be.equal(collectionId, 'Error: Invalid collection ID (from event data)');387388 expect(sendData.nftId).to.be.equal(nftId, 'Error: Invalid NFT ID (from event data)');389390 expect(nftBeforeSendingOpt.isSome, 'Error: Unable to fetch NFT before sending').to.be.true;391392 const nftBeforeSending = nftBeforeSendingOpt.unwrap();393394 const nftAfterSendingOpt = await getNft(api, collectionId, nftId);395396 expect(nftAfterSendingOpt.isSome, 'Error: Unable to fetch NFT after sending').to.be.true;397398 const nftAfterSending = nftAfterSendingOpt.unwrap();399400 const isOwnedByNewOwner = await isNftOwnedBy(api, newOwner, collectionId, nftId);401 const isPending = expectedStatus === 'pending';402403 expect(404 isOwnedByNewOwner,405 `Error: The NFT should be owned by ${newOwner.toString()}`,406 ).to.be.true;407408 expect(nftAfterSending.royalty.eq(nftBeforeSending.royalty), 'Error: Invalid NFT royalty after sending')409 .to.be.true;410411 expect(nftAfterSending.metadata.eq(nftBeforeSending.metadata), 'Error: Invalid NFT metadata after sending')412 .to.be.true;413414 expect(nftAfterSending.equipped.eq(nftBeforeSending.equipped), 'Error: Invalid NFT equipped status after sending')415 .to.be.true;416417 expect(nftAfterSending.pending.eq(isPending), 'Error: Invalid NFT pending state')418 .to.be.true;419}420421export async function acceptNft(422 api: ApiPromise,423 issuerUri: string,424 collectionId: number,425 nftId: number,426 newOwner: string | [number, number],427) {428 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;429 const issuer = privateKey(issuerUri, Number(ss58Format));430 const newOwnerObj = makeNftOwner(api, newOwner);431432 const nftBeforeOpt = await getNft(api, collectionId, nftId);433434 const tx = api.tx.rmrkCore.acceptNft(collectionId, nftId, newOwnerObj);435 const events = await executeTransaction(api, issuer, tx);436437 const acceptResult = extractRmrkCoreTxResult(events, 'NFTAccepted', (data) => {438 return {439 recipient: data[1] as NftOwner,440 collectionId: parseInt(data[2].toString(), 10),441 nftId: parseInt(data[3].toString(), 10),442 };443 });444445 expect(acceptResult.success, 'Error: Unable to accept NFT').to.be.true;446 const acceptData = acceptResult.successData!;447448 expect(acceptData.recipient.eq(newOwnerObj), 'Error: Invalid NFT recipient (from event data)')449 .to.be.true;450451 expect(acceptData.collectionId)452 .to.be.equal(collectionId, 'Error: Invalid collection ID (from event data)');453454 expect(acceptData.nftId)455 .to.be.equal(nftId, 'Error: Invalid NFT ID (from event data)');456457 const nftBefore = nftBeforeOpt.unwrap();458459 const isPendingBeforeAccept = nftBefore.pending.isTrue;460461 const nftAfter = (await getNft(api, collectionId, nftId)).unwrap();462 const isPendingAfterAccept = nftAfter.pending.isTrue;463464 expect(isPendingBeforeAccept, 'Error: NFT should be pending to be accepted')465 .to.be.true;466467 expect(isPendingAfterAccept, 'Error: NFT should NOT be pending after accept')468 .to.be.false;469470 const isOwnedInUniques = await isNftOwnedBy(api, newOwner, collectionId, nftId);471 expect(isOwnedInUniques, `Error: created NFT is not actually owned by ${newOwner.toString()}`)472 .to.be.true;473}474475export async function rejectNft(476 api: ApiPromise,477 issuerUri: string,478 collectionId: number,479 nftId: number,480) {481 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;482 const issuer = privateKey(issuerUri, Number(ss58Format));483 const nftBeforeOpt = await getNft(api, collectionId, nftId);484485 const tx = api.tx.rmrkCore.rejectNft(collectionId, nftId);486 const events = await executeTransaction(api, issuer, tx);487 const rejectResult = extractRmrkCoreTxResult(events, 'NFTRejected', (data) => {488 return {489 collectionId: parseInt(data[1].toString(), 10),490 nftId: parseInt(data[2].toString(), 10),491 };492 });493494 const rejectData = rejectResult.successData!;495496 expect(rejectData.collectionId)497 .to.be.equal(collectionId, 'Error: Invalid collection ID (from event data)');498499 expect(rejectData.nftId)500 .to.be.equal(nftId, 'Error: Invalid NFT ID (from event data)');501502 const nftBefore = nftBeforeOpt.unwrap();503504 const isPendingBeforeReject = nftBefore.pending.isTrue;505506 const nftAfter = await getNft(api, collectionId, nftId);507508 expect(isPendingBeforeReject, 'Error: NFT should be pending to be rejected')509 .to.be.true;510511 expect(nftAfter.isNone, 'Error: NFT should be burned after reject')512 .to.be.true;513}514515export async function createBase(516 api: ApiPromise,517 issuerUri: string,518 baseType: string,519 symbol: string,520 parts: object[],521): Promise<number> {522 let baseId = 0;523 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;524 const issuer = privateKey(issuerUri, Number(ss58Format));525526 const partTypes = api.createType('Vec<RmrkTraitsPartPartType>', parts) as Vec<PartType>;527528 const tx = api.tx.rmrkEquip.createBase(baseType, symbol, partTypes);529 const events = await executeTransaction(api, issuer, tx);530531 const baseResult = extractRmrkEquipTxResult(events, 'BaseCreated', (data) => {532 return parseInt(data[1].toString(), 10);533 });534535 expect(baseResult.success, 'Error: Unable to create Base')536 .to.be.true;537538 baseId = baseResult.successData!;539 const baseOptional = await getBase(api, baseId);540541 expect(baseOptional.isSome, 'Error: Unable to fetch created Base')542 .to.be.true;543544 const base = baseOptional.unwrap();545 const baseParts = await getParts(api, baseId);546547 expect(base.issuer.toString()).to.be.equal(issuer.address, 'Error: Invalid Base issuer');548 expect(base.baseType.toUtf8()).to.be.equal(baseType, 'Error: Invalid Base type');549 expect(base.symbol.toUtf8()).to.be.equal(symbol, 'Error: Invalid Base symbol');550 expect(partTypes.eq(baseParts), 'Error: Received invalid base parts').to.be.true;551552 return baseId;553}554555export async function setResourcePriorities(556 api: ApiPromise,557 issuerUri: string,558 collectionId: number,559 nftId: number,560 priorities: number[],561) {562 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;563 const issuer = privateKey(issuerUri, Number(ss58Format));564565 const prioritiesVec = api.createType('Vec<u32>', priorities);566 const tx = api.tx.rmrkCore.setPriority(collectionId, nftId, prioritiesVec);567 const events = await executeTransaction(api, issuer, tx);568569 const prioResult = extractRmrkCoreTxResult(events, 'PrioritySet', (data) => {570 return {571 collectionId: parseInt(data[0].toString(), 10),572 nftId: parseInt(data[1].toString(), 10),573 };574 });575576 expect(prioResult.success, 'Error: Unable to set resource priorities').to.be.true;577 const eventData = prioResult.successData!;578579 expect(eventData.collectionId)580 .to.be.equal(collectionId, 'Error: Invalid collection ID (set priorities event data)');581582 expect(eventData.nftId).to.be.equal(nftId, 'Error: Invalid NFT ID (set priorities event data');583584 for (let i = 0; i < priorities.length; i++) {585 const resourceId = priorities[i];586587 const fetchedPrio = await getResourcePriority(api, collectionId, nftId, resourceId);588 expect(fetchedPrio).to.be.equal(i, 'Error: Invalid priorities are set');589 }590591}592593export async function setEquippableList(594 api: ApiPromise,595 issuerUri: string,596 baseId: number,597 slotId: number,598 equippableList: 'All' | 'Empty' | { 'Custom': number[] },599) {600 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;601 const issuer = privateKey(issuerUri, Number(ss58Format));602 const equippable = api.createType('RmrkTraitsPartEquippableList', equippableList) as EquippableList;603604 const tx = api.tx.rmrkEquip.equippable(baseId, slotId, equippable);605 const events = await executeTransaction(api, issuer, tx);606607 const equipListResult = extractRmrkEquipTxResult(events, 'EquippablesUpdated', (data) => {608 return {609 baseId: parseInt(data[0].toString(), 10),610 slotId: parseInt(data[1].toString(), 10),611 };612 });613614 expect(equipListResult.success, 'Error: unable to update equippable list').to.be.true;615 const updateEvent = equipListResult.successData!;616617 expect(updateEvent.baseId)618 .to.be.equal(baseId, 'Error: invalid base ID from update equippable event');619620 expect(updateEvent.slotId)621 .to.be.equal(slotId, 'Error: invalid base ID from update equippable event');622623 const fetchedEquippableList = await getEquippableList(api, baseId, slotId);624625 expect(fetchedEquippableList, 'Error: unable to fetch equippable list').to.be.not.null;626 if (fetchedEquippableList) {627 expect(fetchedEquippableList)628 .to.be.deep.equal(equippableList, 'Error: invalid equippable list was set');629 }630}631632export async function addTheme(633 api: ApiPromise,634 issuerUri: string,635 baseId: number,636 themeObj: object,637 filterKeys: string[] | null = null,638) {639 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;640 const issuer = privateKey(issuerUri, Number(ss58Format));641 const theme = api.createType('RmrkTraitsTheme', themeObj) as Theme;642643 const tx = api.tx.rmrkEquip.themeAdd(baseId, theme);644 const events = await executeTransaction(api, issuer, tx);645646 expect(isTxResultSuccess(events), 'Error: Unable to add Theme').to.be.true;647648 const fetchedThemeOpt = await getTheme(api, baseId, theme.name.toUtf8(), null);649650 expect(fetchedThemeOpt.isSome, 'Error: Unable to fetch theme').to.be.true;651652 const fetchedTheme = fetchedThemeOpt.unwrap();653654 expect(theme.name.eq(fetchedTheme.name), 'Error: Invalid theme name').to.be.true;655656 for (let i = 0; i < theme.properties.length; i++) {657 const property = theme.properties[i];658 const propertyKey = property.key.toUtf8();659660 const propertyFoundCount = fetchedTheme.properties.filter((fetchedProp) => property.key.eq(fetchedProp.key)).length;661662 expect(propertyFoundCount > 1, `Error: Too many properties with key ${propertyKey} found`)663 .to.be.false;664665 if (filterKeys) {666 const isFiltered = fetchedTheme.properties.find((fetchedProp) => fetchedProp.key.eq(property.key)) === undefined;667668 if (isFiltered) {669 expect(propertyFoundCount === 0, `Error: Unexpected filtered key ${propertyKey}`)670 .to.be.true;671 continue;672 }673 }674675 expect(propertyFoundCount === 1, `Error: The property with key ${propertyKey} is not found`)676 .to.be.true;677 }678}679680export async function lockCollection(681 api: ApiPromise,682 issuerUri: string,683 collectionId: number,684 max = 0,685) {686 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;687 const issuer = privateKey(issuerUri, Number(ss58Format));688 const tx = api.tx.rmrkCore.lockCollection(collectionId);689 const events = await executeTransaction(api, issuer, tx);690 const lockResult = extractRmrkCoreTxResult(events, 'CollectionLocked', (data) => {691 return parseInt(data[1].toString(), 10);692 });693 expect(lockResult.success, 'Error: Unable to lock a collection').to.be.true;694 expect(lockResult.successData!, 'Error: Invalid collection was locked')695 .to.be.eq(collectionId);696697 await getCollection(api, collectionId).then((collectionOption) => {698 const collection = collectionOption.unwrap();699 expect(collection.max.unwrap().toNumber()).to.be.equal(max);700 });701}702703export async function setPropertyCollection(704 api: ApiPromise,705 issuerUri: string,706 collectionId: number,707 key: string,708 value: string,709) {710 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;711 const alice = privateKey(issuerUri, Number(ss58Format));712713 const tx = api.tx.rmrkCore.setProperty(collectionId, null, key, value);714 const events = await executeTransaction(api, alice, tx);715 const propResult = extractRmrkCoreTxResult(events, 'PropertySet', (data) => {716 return {717 collectionId: parseInt(data[0].toString(), 10),718 nftId: data[1] as Option<u32>,719 key: data[2] as Bytes,720 value: data[3] as Bytes,721 };722 });723724 expect(propResult.success, 'Error: Unable to set collection property').to.be.true;725 const eventData = propResult.successData!;726 const eventDescription = 'from set collection property event';727728 expect(eventData.collectionId, 'Error: Invalid collection ID ' + eventDescription)729 .to.be.equal(collectionId);730731 expect(eventData.nftId.eq(null), 'Error: Unexpected NFT ID ' + eventDescription)732 .to.be.true;733734 expect(eventData.key.eq(key), 'Error: Invalid property key ' + eventDescription)735 .to.be.true;736737 expect(eventData.value.eq(value), 'Error: Invalid property value ' + eventDescription)738 .to.be.true;739740 expect(await isCollectionPropertyExists(api, collectionId, key, value))741 .to.be.true;742}743744export async function burnNft(745 api: ApiPromise,746 issuerUri: string,747 collectionId: number,748 nftId: number,749) {750 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;751 const issuer = privateKey(issuerUri, Number(ss58Format));752 const maxBurns = 10;753 const tx = api.tx.rmrkCore.burnNft(collectionId, nftId, maxBurns);754 const events = await executeTransaction(api, issuer, tx);755 const burnResult = extractRmrkCoreTxResult(events, 'NFTBurned', (data) => {756 return parseInt(data[1].toString(), 10);757 });758759 expect(burnResult.success, 'Error: Unable to burn an NFT').to.be.true;760 expect(burnResult.successData!, 'Error: Invalid NFT was burned')761 .to.be.eq(nftId);762763 const nftBurned = await getNft(api, collectionId, nftId);764 expect(nftBurned.isSome).to.be.false;765}766767export async function acceptNftResource(768 api: ApiPromise,769 issuerUri: string,770 collectionId: number,771 nftId: number,772 resourceId: number,773) {774 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;775 const issuer = privateKey(issuerUri, Number(ss58Format));776777 const tx = api.tx.rmrkCore.acceptResource(778 collectionId,779 nftId,780 resourceId,781 );782783 const events = await executeTransaction(api, issuer, tx);784 const acceptResult = extractRmrkCoreTxResult(events, 'ResourceAccepted', (data) => {785 return {786 nftId: parseInt(data[0].toString(), 10),787 resourceId: parseInt(data[1].toString(), 10),788 };789 });790791 expect(acceptResult.success, 'Error: Unable to accept a resource').to.be.true;792 expect(acceptResult.successData!.nftId, 'Error: Invalid NFT ID while accepting a resource')793 .to.be.eq(nftId);794 expect(acceptResult.successData!.resourceId, 'Error: Invalid resource ID while accepting a resource')795 .to.be.eq(resourceId);796797 const resource = await getResourceById(api, collectionId, nftId, resourceId);798 checkResourceStatus(resource, 'added');799}800801async function executeResourceCreation(802 api: ApiPromise,803 issuer: IKeyringPair,804 tx: any,805 collectionId: number,806 nftId: number,807 expectedStatus: 'pending' | 'added',808): Promise<ResourceInfo> {809 const events = await executeTransaction(api, issuer, tx);810811 const resourceResult = extractRmrkCoreTxResult(events, 'ResourceAdded', (data) => {812 return parseInt(data[1].toString(), 10);813 });814 expect(resourceResult.success, 'Error: Unable to add resource').to.be.true;815 const resourceId = resourceResult.successData!;816817 const resource = await getResourceById(api, collectionId, nftId, resourceId);818 checkResourceStatus(resource, expectedStatus);819820 return resource;821}822823export async function addNftBasicResource(824 api: ApiPromise,825 issuerUri: string,826 expectedStatus: 'pending' | 'added',827 collectionId: number,828 nftId: number,829 src: string | null,830 metadata: string | null,831 license: string | null,832 thumb: string | null,833): Promise<number> {834 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;835 const issuer = privateKey(issuerUri, Number(ss58Format));836837 const basicResource = api.createType('RmrkTraitsResourceBasicResource', {838 src: src,839 metadata: metadata,840 license: license,841 thumb: thumb,842 }) as BasicResource;843844 const tx = api.tx.rmrkCore.addBasicResource(845 collectionId,846 nftId,847 basicResource,848 );849850 const resource = await executeResourceCreation(api, issuer, tx, collectionId, nftId, expectedStatus);851852 // FIXME A workaround. It seems it is a PolkadotJS bug.853 // All of the following are `false`.854 //855 // console.log('>>> basic:', resource.resource.isBasic);856 // console.log('>>> composable:', resource.resource.isComposable);857 // console.log('>>> slot:', resource.resource.isSlot);858 const resourceJson = resource.resource.toHuman() as any;859860 expect(Object.prototype.hasOwnProperty.call(resourceJson, 'Basic'), 'Error: Expected basic resource type')861 .to.be.true;862863 const recvBasicRes = resourceJson['Basic'];864865 expect(recvBasicRes.src, 'Error: Invalid basic resource src')866 .to.be.eq(src);867 expect(recvBasicRes.metadata, 'Error: basic first resource metadata')868 .to.be.eq(metadata);869 expect(recvBasicRes.license, 'Error: basic first resource license')870 .to.be.eq(license);871 expect(recvBasicRes.thumb, 'Error: basic first resource thumb')872 .to.be.eq(thumb);873874 return resource.id.toNumber();875}876877export async function addNftComposableResource(878 api: ApiPromise,879 issuerUri: string,880 expectedStatus: 'pending' | 'added',881 collectionId: number,882 nftId: number,883 parts: number[],884 baseId: number,885 src: string | null,886 metadata: string | null,887 license: string | null,888 thumb: string | null,889): Promise<number> {890 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;891 const issuer = privateKey(issuerUri, Number(ss58Format));892893 const composableResource = api.createType('RmrkTraitsResourceComposableResource', {894 parts: parts, // api.createType('Vec<u32>', parts),895 base: baseId,896 src: src,897 metadata: metadata,898 license: license,899 thumb: thumb,900 }) as ComposableResource;901902 const tx = api.tx.rmrkCore.addComposableResource(903 collectionId,904 nftId,905 composableResource,906 );907908 const resource = await executeResourceCreation(api, issuer, tx, collectionId, nftId, expectedStatus);909910 // FIXME A workaround. It seems it is a PolkadotJS bug.911 // All of the following are `false`.912 //913 // console.log('>>> basic:', resource.resource.isBasic);914 // console.log('>>> composable:', resource.resource.isComposable);915 // console.log('>>> slot:', resource.resource.isSlot);916 const resourceJson = resource.resource.toHuman() as any;917918 expect(Object.prototype.hasOwnProperty.call(resourceJson, 'Composable'), 'Error: Expected composable resource type')919 .to.be.true;920921 const recvComposableRes = resourceJson['Composable'];922923 expect(recvComposableRes.parts.toString(), 'Error: Invalid composable resource parts')924 .to.be.eq(parts.toString());925 expect(recvComposableRes.base, 'Error: Invalid composable resource base id')926 .to.be.eq(baseId.toString());927 expect(recvComposableRes.src, 'Error: Invalid composable resource src')928 .to.be.eq(src);929 expect(recvComposableRes.metadata, 'Error: Invalid composable resource metadata')930 .to.be.eq(metadata);931 expect(recvComposableRes.license, 'Error: Invalid composable resource license')932 .to.be.eq(license);933 expect(recvComposableRes.thumb, 'Error: Invalid composable resource thumb')934 .to.be.eq(thumb);935936 return resource.id.toNumber();937}938939export async function addNftSlotResource(940 api: ApiPromise,941 issuerUri: string,942 expectedStatus: 'pending' | 'added',943 collectionId: number,944 nftId: number,945 baseId: number,946 slotId: number,947 src: string | null,948 metadata: string | null,949 license: string | null,950 thumb: string | null,951): Promise<number> {952 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;953 const issuer = privateKey(issuerUri, Number(ss58Format));954955 const slotResource = api.createType('RmrkTraitsResourceSlotResource', {956 base: baseId,957 src: src,958 metadata,959 slot: slotId,960 license: license,961 thumb: thumb,962 }) as SlotResource;963964 const tx = api.tx.rmrkCore.addSlotResource(965 collectionId,966 nftId,967 slotResource,968 );969970 const resource = await executeResourceCreation(api, issuer, tx, collectionId, nftId, expectedStatus);971972 // FIXME A workaround. It seems it is a PolkadotJS bug.973 // All of the following are `false`.974 //975 // console.log('>>> basic:', resource.resource.isBasic);976 // console.log('>>> composable:', resource.resource.isComposable);977 // console.log('>>> slot:', resource.resource.isSlot);978 const resourceJson = resource.resource.toHuman() as any;979980 expect(Object.prototype.hasOwnProperty.call(resourceJson, 'Slot'), 'Error: Expected slot resource type')981 .to.be.true;982983 const recvSlotRes = resourceJson['Slot'];984985 expect(recvSlotRes.base, 'Error: Invalid slot resource base id')986 .to.be.eq(baseId.toString());987 expect(recvSlotRes.slot, 'Error: Invalid slot resource slot id')988 .to.be.eq(slotId.toString());989 expect(recvSlotRes.src, 'Error: Invalid slot resource src')990 .to.be.eq(src);991 expect(recvSlotRes.metadata, 'Error: Invalid slot resource metadata')992 .to.be.eq(metadata);993 expect(recvSlotRes.license, 'Error: Invalid slot resource license')994 .to.be.eq(license);995 expect(recvSlotRes.thumb, 'Error: Invalid slot resource thumb')996 .to.be.eq(thumb);997998 return resource.id.toNumber();999}10001001export async function equipNft(1002 api: ApiPromise,1003 issuerUri: string,1004 item: NftIdTuple,1005 equipper: NftIdTuple,1006 resource: number,1007 base: number,1008 slot: number,1009) {1010 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;1011 const issuer = privateKey(issuerUri, Number(ss58Format));1012 const tx = api.tx.rmrkEquip.equip(item, equipper, resource, base, slot);1013 const events = await executeTransaction(api, issuer, tx);1014 const equipResult = extractRmrkEquipTxResult(events, 'SlotEquipped', (data) => {1015 return {1016 item_collection: parseInt(data[0].toString(), 10),1017 item_nft: parseInt(data[1].toString(), 10),1018 base_id: parseInt(data[2].toString(), 10),1019 slot_id: parseInt(data[3].toString(), 10),1020 };1021 });1022 expect(equipResult.success, 'Error: Unable to equip an item').to.be.true;1023 expect(equipResult.successData!.item_collection, 'Error: Invalid item collection id')1024 .to.be.eq(item[0]);1025 expect(equipResult.successData!.item_nft, 'Error: Invalid item NFT id')1026 .to.be.eq(item[1]);1027 expect(equipResult.successData!.base_id, 'Error: Invalid base id')1028 .to.be.eq(base);1029 expect(equipResult.successData!.slot_id, 'Error: Invalid slot id')1030 .to.be.eq(slot);1031}10321033export async function unequipNft(1034 api: ApiPromise,1035 issuerUri: string,1036 item: any,1037 equipper: any,1038 resource: number,1039 base: number,1040 slot: number,1041) {1042 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;1043 const issuer = privateKey(issuerUri, Number(ss58Format));1044 const tx = api.tx.rmrkEquip.equip(item, equipper, resource, base, slot);1045 const events = await executeTransaction(api, issuer, tx);10461047 const unEquipResult = extractRmrkEquipTxResult(1048 events,1049 'SlotUnequipped',1050 (data) => {1051 return {1052 item_collection: parseInt(data[0].toString(), 10),1053 item_nft: parseInt(data[1].toString(), 10),1054 base_id: parseInt(data[2].toString(), 10),1055 slot_id: parseInt(data[3].toString(), 10),1056 };1057 },1058 );10591060 expect(unEquipResult.success, 'Error: Unable to unequip an item').to.be.true;1061 expect(unEquipResult.successData!.item_collection, 'Error: Invalid item collection id')1062 .to.be.eq(item[0]);1063 expect(unEquipResult.successData!.item_nft, 'Error: Invalid item NFT id')1064 .to.be.eq(item[1]);1065 expect(unEquipResult.successData!.base_id, 'Error: Invalid base id')1066 .to.be.eq(base);1067 expect(unEquipResult.successData!.slot_id, 'Error: Invalid slot id')1068 .to.be.eq(slot);1069}10701071export async function removeNftResource(1072 api: ApiPromise,1073 expectedStatus: 'pending' | 'removed',1074 issuerUri: string,1075 collectionId: number,1076 nftId: number,1077 resourceId: number,1078) {1079 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;1080 const issuer = privateKey(issuerUri, Number(ss58Format));10811082 const tx = api.tx.rmrkCore.removeResource(collectionId, nftId, resourceId);1083 const events = await executeTransaction(api, issuer, tx);1084 const removeResult = extractRmrkCoreTxResult(events, 'ResourceRemoval', (data) => {1085 return {1086 nftId: parseInt(data[0].toString(), 10),1087 resourceId: parseInt(data[1].toString(), 10),1088 };1089 });1090 expect(removeResult.success, 'Error: Unable to remove a resource').to.be.true;1091 expect(removeResult.successData!.nftId, 'Error: Invalid NFT Id while removing a resource')1092 .to.be.eq(nftId);1093 expect(removeResult.successData!.resourceId, 'Error: Invalid resource Id while removing a resource')1094 .to.be.eq(resourceId);10951096 const afterDeleting = await findResourceById(api, collectionId, nftId, resourceId);10971098 if (expectedStatus === 'pending') {1099 expect(afterDeleting).not.to.be.null;1100 expect(afterDeleting?.pendingRemoval.isTrue).to.be.equal(true);1101 } else {1102 expect(afterDeleting).to.be.null;1103 }1104}11051106export async function acceptResourceRemoval(1107 api: ApiPromise,1108 issuerUri: string,1109 collectionId: number,1110 nftId: number,1111 resourceId: number,1112) {1113 const ss58Format = api.registry.getChainProperties()!.toJSON().ss58Format;1114 const issuer = privateKey(issuerUri, Number(ss58Format));11151116 const tx = api.tx.rmrkCore.acceptResourceRemoval(collectionId, nftId, resourceId);1117 const events = await executeTransaction(api, issuer, tx);1118 const acceptResult = extractRmrkCoreTxResult(events, 'ResourceRemovalAccepted', (data) => {1119 return {1120 nftId: parseInt(data[0].toString(), 10),1121 resourceId: parseInt(data[1].toString(), 10),1122 };1123 });1124 expect(acceptResult.success, 'Error: Unable to accept a resource').to.be.true;1125 expect(acceptResult.successData!.nftId, 'Error: Invalid NFT Id while accepting a resource')1126 .to.be.eq(nftId);1127 expect(acceptResult.successData!.resourceId, 'Error: Invalid resource Id while accepting a resource')1128 .to.be.eq(resourceId);11291130 const afterDeleting = await findResourceById(api, collectionId, nftId, resourceId);1131 expect(afterDeleting, 'Error: resource deleting failed').to.be.null;1132}tests/src/util/helpers.tsdiffbeforeafterboth--- a/tests/src/util/helpers.ts
+++ b/tests/src/util/helpers.ts
@@ -439,7 +439,7 @@
tokenPrefix: strToUTF16(tokenPrefix),
mode: modeprm as any,
});
- const events = await submitTransactionAsync(sender, tx);
+ const events = await executeTransaction(api, sender, tx);
return getCreateCollectionResult(events);
}
tests/yarn.lockdiffbeforeafterboth--- a/tests/yarn.lock
+++ b/tests/yarn.lock
@@ -10,150 +10,150 @@
"@jridgewell/gen-mapping" "^0.1.0"
"@jridgewell/trace-mapping" "^0.3.9"
-"@babel/code-frame@^7.16.7":
- version "7.16.7"
- resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.16.7.tgz#44416b6bd7624b998f5b1af5d470856c40138789"
- integrity sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==
+"@babel/code-frame@^7.18.6":
+ version "7.18.6"
+ resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a"
+ integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==
dependencies:
- "@babel/highlight" "^7.16.7"
+ "@babel/highlight" "^7.18.6"
-"@babel/compat-data@^7.17.10":
- version "7.17.10"
- resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.17.10.tgz#711dc726a492dfc8be8220028b1b92482362baab"
- integrity sha512-GZt/TCsG70Ms19gfZO1tM4CVnXsPgEPBCpJu+Qz3L0LUDsY5nZqFZglIoPC1kIYOtNBZlrnFT+klg12vFGZXrw==
+"@babel/compat-data@^7.18.6":
+ version "7.18.8"
+ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.18.8.tgz#2483f565faca607b8535590e84e7de323f27764d"
+ integrity sha512-HSmX4WZPPK3FUxYp7g2T6EyO8j96HlZJlxmKPSh6KAcqwyDrfx7hKjXpAW/0FhFfTJsR0Yt4lAjLI2coMptIHQ==
-"@babel/core@^7.18.2":
- version "7.18.2"
- resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.18.2.tgz#87b2fcd7cce9becaa7f5acebdc4f09f3dd19d876"
- integrity sha512-A8pri1YJiC5UnkdrWcmfZTJTV85b4UXTAfImGmCfYmax4TR9Cw8sDS0MOk++Gp2mE/BefVJ5nwy5yzqNJbP/DQ==
+"@babel/core@^7.18.6":
+ version "7.18.6"
+ resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.18.6.tgz#54a107a3c298aee3fe5e1947a6464b9b6faca03d"
+ integrity sha512-cQbWBpxcbbs/IUredIPkHiAGULLV8iwgNRMFzvbhEXISp4f3rUUXE5+TIw6KwUWUR3DwyI6gmBRnmAtYaWehwQ==
dependencies:
"@ampproject/remapping" "^2.1.0"
- "@babel/code-frame" "^7.16.7"
- "@babel/generator" "^7.18.2"
- "@babel/helper-compilation-targets" "^7.18.2"
- "@babel/helper-module-transforms" "^7.18.0"
- "@babel/helpers" "^7.18.2"
- "@babel/parser" "^7.18.0"
- "@babel/template" "^7.16.7"
- "@babel/traverse" "^7.18.2"
- "@babel/types" "^7.18.2"
+ "@babel/code-frame" "^7.18.6"
+ "@babel/generator" "^7.18.6"
+ "@babel/helper-compilation-targets" "^7.18.6"
+ "@babel/helper-module-transforms" "^7.18.6"
+ "@babel/helpers" "^7.18.6"
+ "@babel/parser" "^7.18.6"
+ "@babel/template" "^7.18.6"
+ "@babel/traverse" "^7.18.6"
+ "@babel/types" "^7.18.6"
convert-source-map "^1.7.0"
debug "^4.1.0"
gensync "^1.0.0-beta.2"
json5 "^2.2.1"
semver "^6.3.0"
-"@babel/generator@^7.18.2":
- version "7.18.2"
- resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.2.tgz#33873d6f89b21efe2da63fe554460f3df1c5880d"
- integrity sha512-W1lG5vUwFvfMd8HVXqdfbuG7RuaSrTCCD8cl8fP8wOivdbtbIg2Db3IWUcgvfxKbbn6ZBGYRW/Zk1MIwK49mgw==
+"@babel/generator@^7.18.6", "@babel/generator@^7.18.7":
+ version "7.18.7"
+ resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.7.tgz#2aa78da3c05aadfc82dbac16c99552fc802284bd"
+ integrity sha512-shck+7VLlY72a2w9c3zYWuE1pwOKEiQHV7GTUbSnhyl5eu3i04t30tBY82ZRWrDfo3gkakCFtevExnxbkf2a3A==
dependencies:
- "@babel/types" "^7.18.2"
- "@jridgewell/gen-mapping" "^0.3.0"
+ "@babel/types" "^7.18.7"
+ "@jridgewell/gen-mapping" "^0.3.2"
jsesc "^2.5.1"
-"@babel/helper-compilation-targets@^7.18.2":
- version "7.18.2"
- resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.2.tgz#67a85a10cbd5fc7f1457fec2e7f45441dc6c754b"
- integrity sha512-s1jnPotJS9uQnzFtiZVBUxe67CuBa679oWFHpxYYnTpRL/1ffhyX44R9uYiXoa/pLXcY9H2moJta0iaanlk/rQ==
+"@babel/helper-compilation-targets@^7.18.6":
+ version "7.18.6"
+ resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.6.tgz#18d35bfb9f83b1293c22c55b3d576c1315b6ed96"
+ integrity sha512-vFjbfhNCzqdeAtZflUFrG5YIFqGTqsctrtkZ1D/NB0mDW9TwW3GmmUepYY4G9wCET5rY5ugz4OGTcLd614IzQg==
dependencies:
- "@babel/compat-data" "^7.17.10"
- "@babel/helper-validator-option" "^7.16.7"
+ "@babel/compat-data" "^7.18.6"
+ "@babel/helper-validator-option" "^7.18.6"
browserslist "^4.20.2"
semver "^6.3.0"
-"@babel/helper-environment-visitor@^7.16.7", "@babel/helper-environment-visitor@^7.18.2":
- version "7.18.2"
- resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.2.tgz#8a6d2dedb53f6bf248e31b4baf38739ee4a637bd"
- integrity sha512-14GQKWkX9oJzPiQQ7/J36FTXcD4kSp8egKjO9nINlSKiHITRA9q/R74qu8S9xlc/b/yjsJItQUeeh3xnGN0voQ==
+"@babel/helper-environment-visitor@^7.18.6":
+ version "7.18.6"
+ resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.6.tgz#b7eee2b5b9d70602e59d1a6cad7dd24de7ca6cd7"
+ integrity sha512-8n6gSfn2baOY+qlp+VSzsosjCVGFqWKmDF0cCWOybh52Dw3SEyoWR1KrhMJASjLwIEkkAufZ0xvr+SxLHSpy2Q==
-"@babel/helper-function-name@^7.17.9":
- version "7.17.9"
- resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.17.9.tgz#136fcd54bc1da82fcb47565cf16fd8e444b1ff12"
- integrity sha512-7cRisGlVtiVqZ0MW0/yFB4atgpGLWEHUVYnb448hZK4x+vih0YO5UoS11XIYtZYqHd0dIPMdUSv8q5K4LdMnIg==
+"@babel/helper-function-name@^7.18.6":
+ version "7.18.6"
+ resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.18.6.tgz#8334fecb0afba66e6d87a7e8c6bb7fed79926b83"
+ integrity sha512-0mWMxV1aC97dhjCah5U5Ua7668r5ZmSC2DLfH2EZnf9c3/dHZKiFa5pRLMH5tjSl471tY6496ZWk/kjNONBxhw==
dependencies:
- "@babel/template" "^7.16.7"
- "@babel/types" "^7.17.0"
+ "@babel/template" "^7.18.6"
+ "@babel/types" "^7.18.6"
-"@babel/helper-hoist-variables@^7.16.7":
- version "7.16.7"
- resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz#86bcb19a77a509c7b77d0e22323ef588fa58c246"
- integrity sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==
+"@babel/helper-hoist-variables@^7.18.6":
+ version "7.18.6"
+ resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678"
+ integrity sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==
dependencies:
- "@babel/types" "^7.16.7"
+ "@babel/types" "^7.18.6"
-"@babel/helper-module-imports@^7.16.7":
- version "7.16.7"
- resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz#25612a8091a999704461c8a222d0efec5d091437"
- integrity sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==
+"@babel/helper-module-imports@^7.18.6":
+ version "7.18.6"
+ resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz#1e3ebdbbd08aad1437b428c50204db13c5a3ca6e"
+ integrity sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==
dependencies:
- "@babel/types" "^7.16.7"
+ "@babel/types" "^7.18.6"
-"@babel/helper-module-transforms@^7.18.0":
- version "7.18.0"
- resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.18.0.tgz#baf05dec7a5875fb9235bd34ca18bad4e21221cd"
- integrity sha512-kclUYSUBIjlvnzN2++K9f2qzYKFgjmnmjwL4zlmU5f8ZtzgWe8s0rUPSTGy2HmK4P8T52MQsS+HTQAgZd3dMEA==
+"@babel/helper-module-transforms@^7.18.6":
+ version "7.18.8"
+ resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.18.8.tgz#4f8408afead0188cfa48672f9d0e5787b61778c8"
+ integrity sha512-che3jvZwIcZxrwh63VfnFTUzcAM9v/lznYkkRxIBGMPt1SudOKHAEec0SIRCfiuIzTcF7VGj/CaTT6gY4eWxvA==
dependencies:
- "@babel/helper-environment-visitor" "^7.16.7"
- "@babel/helper-module-imports" "^7.16.7"
- "@babel/helper-simple-access" "^7.17.7"
- "@babel/helper-split-export-declaration" "^7.16.7"
- "@babel/helper-validator-identifier" "^7.16.7"
- "@babel/template" "^7.16.7"
- "@babel/traverse" "^7.18.0"
- "@babel/types" "^7.18.0"
+ "@babel/helper-environment-visitor" "^7.18.6"
+ "@babel/helper-module-imports" "^7.18.6"
+ "@babel/helper-simple-access" "^7.18.6"
+ "@babel/helper-split-export-declaration" "^7.18.6"
+ "@babel/helper-validator-identifier" "^7.18.6"
+ "@babel/template" "^7.18.6"
+ "@babel/traverse" "^7.18.8"
+ "@babel/types" "^7.18.8"
-"@babel/helper-simple-access@^7.17.7":
- version "7.18.2"
- resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.18.2.tgz#4dc473c2169ac3a1c9f4a51cfcd091d1c36fcff9"
- integrity sha512-7LIrjYzndorDY88MycupkpQLKS1AFfsVRm2k/9PtKScSy5tZq0McZTj+DiMRynboZfIqOKvo03pmhTaUgiD6fQ==
+"@babel/helper-simple-access@^7.18.6":
+ version "7.18.6"
+ resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz#d6d8f51f4ac2978068df934b569f08f29788c7ea"
+ integrity sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==
dependencies:
- "@babel/types" "^7.18.2"
+ "@babel/types" "^7.18.6"
-"@babel/helper-split-export-declaration@^7.16.7":
- version "7.16.7"
- resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz#0b648c0c42da9d3920d85ad585f2778620b8726b"
- integrity sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==
+"@babel/helper-split-export-declaration@^7.18.6":
+ version "7.18.6"
+ resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz#7367949bc75b20c6d5a5d4a97bba2824ae8ef075"
+ integrity sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==
dependencies:
- "@babel/types" "^7.16.7"
+ "@babel/types" "^7.18.6"
-"@babel/helper-validator-identifier@^7.16.7":
- version "7.16.7"
- resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz#e8c602438c4a8195751243da9031d1607d247cad"
- integrity sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==
+"@babel/helper-validator-identifier@^7.18.6":
+ version "7.18.6"
+ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz#9c97e30d31b2b8c72a1d08984f2ca9b574d7a076"
+ integrity sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g==
-"@babel/helper-validator-option@^7.16.7":
- version "7.16.7"
- resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz#b203ce62ce5fe153899b617c08957de860de4d23"
- integrity sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==
+"@babel/helper-validator-option@^7.18.6":
+ version "7.18.6"
+ resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz#bf0d2b5a509b1f336099e4ff36e1a63aa5db4db8"
+ integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==
-"@babel/helpers@^7.18.2":
- version "7.18.2"
- resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.18.2.tgz#970d74f0deadc3f5a938bfa250738eb4ac889384"
- integrity sha512-j+d+u5xT5utcQSzrh9p+PaJX94h++KN+ng9b9WEJq7pkUPAd61FGqhjuUEdfknb3E/uDBb7ruwEeKkIxNJPIrg==
+"@babel/helpers@^7.18.6":
+ version "7.18.6"
+ resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.18.6.tgz#4c966140eaa1fcaa3d5a8c09d7db61077d4debfd"
+ integrity sha512-vzSiiqbQOghPngUYt/zWGvK3LAsPhz55vc9XNN0xAl2gV4ieShI2OQli5duxWHD+72PZPTKAcfcZDE1Cwc5zsQ==
dependencies:
- "@babel/template" "^7.16.7"
- "@babel/traverse" "^7.18.2"
- "@babel/types" "^7.18.2"
+ "@babel/template" "^7.18.6"
+ "@babel/traverse" "^7.18.6"
+ "@babel/types" "^7.18.6"
-"@babel/highlight@^7.16.7":
- version "7.17.12"
- resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.17.12.tgz#257de56ee5afbd20451ac0a75686b6b404257351"
- integrity sha512-7yykMVF3hfZY2jsHZEEgLc+3x4o1O+fYyULu11GynEUQNwB6lua+IIQn1FiJxNucd5UlyJryrwsOh8PL9Sn8Qg==
+"@babel/highlight@^7.18.6":
+ version "7.18.6"
+ resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf"
+ integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==
dependencies:
- "@babel/helper-validator-identifier" "^7.16.7"
+ "@babel/helper-validator-identifier" "^7.18.6"
chalk "^2.0.0"
js-tokens "^4.0.0"
-"@babel/parser@^7.16.7", "@babel/parser@^7.18.0":
- version "7.18.4"
- resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.4.tgz#6774231779dd700e0af29f6ad8d479582d7ce5ef"
- integrity sha512-FDge0dFazETFcxGw/EXzOkN8uJp0PC7Qbm+Pe9T+av2zlBpOgunFHkQPPn+eRuClU73JF+98D531UgayY89tow==
+"@babel/parser@^7.18.6", "@babel/parser@^7.18.8":
+ version "7.18.8"
+ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.8.tgz#822146080ac9c62dac0823bb3489622e0bc1cbdf"
+ integrity sha512-RSKRfYX20dyH+elbJK2uqAkVyucL+xXzhqlMD5/ZXx+dAAwpyB7HsvnHe/ZUGOF+xLr5Wx9/JoXVTj6BQE2/oA==
-"@babel/register@^7.17.7":
- version "7.17.7"
- resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.17.7.tgz#5eef3e0f4afc07e25e847720e7b987ae33f08d0b"
- integrity sha512-fg56SwvXRifootQEDQAu1mKdjh5uthPzdO0N6t358FktfL4XjAVXuH58ULoiW8mesxiOgNIrxiImqEwv0+hRRA==
+"@babel/register@^7.18.6":
+ version "7.18.6"
+ resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.18.6.tgz#48a4520f1b2a7d7ac861e8148caeb0cefe6c59db"
+ integrity sha512-tkYtONzaO8rQubZzpBnvZPFcHgh8D9F55IjOsYton4X2IBoyRn2ZSWQqySTZnUn2guZbxbQiAB27hJEbvXamhQ==
dependencies:
clone-deep "^4.0.1"
find-cache-dir "^2.0.0"
@@ -161,44 +161,44 @@
pirates "^4.0.5"
source-map-support "^0.5.16"
-"@babel/runtime@^7.17.9", "@babel/runtime@^7.18.3":
- version "7.18.3"
- resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.18.3.tgz#c7b654b57f6f63cf7f8b418ac9ca04408c4579f4"
- integrity sha512-38Y8f7YUhce/K7RMwTp7m0uCumpv9hZkitCbBClqQIow1qSbCvGkcegKOXpEWCQLfWmevgRiWokZ1GkpfhbZug==
+"@babel/runtime@^7.18.6":
+ version "7.18.6"
+ resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.18.6.tgz#6a1ef59f838debd670421f8c7f2cbb8da9751580"
+ integrity sha512-t9wi7/AW6XtKahAe20Yw0/mMljKq0B1r2fPdvaAdV/KPDZewFXdaaa6K7lxmZBZ8FBNpCiAT6iHPmd6QO9bKfQ==
dependencies:
regenerator-runtime "^0.13.4"
-"@babel/template@^7.16.7":
- version "7.16.7"
- resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.16.7.tgz#8d126c8701fde4d66b264b3eba3d96f07666d155"
- integrity sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==
+"@babel/template@^7.18.6":
+ version "7.18.6"
+ resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.6.tgz#1283f4993e00b929d6e2d3c72fdc9168a2977a31"
+ integrity sha512-JoDWzPe+wgBsTTgdnIma3iHNFC7YVJoPssVBDjiHfNlyt4YcunDtcDOUmfVDfCK5MfdsaIoX9PkijPhjH3nYUw==
dependencies:
- "@babel/code-frame" "^7.16.7"
- "@babel/parser" "^7.16.7"
- "@babel/types" "^7.16.7"
+ "@babel/code-frame" "^7.18.6"
+ "@babel/parser" "^7.18.6"
+ "@babel/types" "^7.18.6"
-"@babel/traverse@^7.18.0", "@babel/traverse@^7.18.2":
- version "7.18.2"
- resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.2.tgz#b77a52604b5cc836a9e1e08dca01cba67a12d2e8"
- integrity sha512-9eNwoeovJ6KH9zcCNnENY7DMFwTU9JdGCFtqNLfUAqtUHRCOsTOqWoffosP8vKmNYeSBUv3yVJXjfd8ucwOjUA==
+"@babel/traverse@^7.18.6", "@babel/traverse@^7.18.8":
+ version "7.18.8"
+ resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.8.tgz#f095e62ab46abf1da35e5a2011f43aee72d8d5b0"
+ integrity sha512-UNg/AcSySJYR/+mIcJQDCv00T+AqRO7j/ZEJLzpaYtgM48rMg5MnkJgyNqkzo88+p4tfRvZJCEiwwfG6h4jkRg==
dependencies:
- "@babel/code-frame" "^7.16.7"
- "@babel/generator" "^7.18.2"
- "@babel/helper-environment-visitor" "^7.18.2"
- "@babel/helper-function-name" "^7.17.9"
- "@babel/helper-hoist-variables" "^7.16.7"
- "@babel/helper-split-export-declaration" "^7.16.7"
- "@babel/parser" "^7.18.0"
- "@babel/types" "^7.18.2"
+ "@babel/code-frame" "^7.18.6"
+ "@babel/generator" "^7.18.7"
+ "@babel/helper-environment-visitor" "^7.18.6"
+ "@babel/helper-function-name" "^7.18.6"
+ "@babel/helper-hoist-variables" "^7.18.6"
+ "@babel/helper-split-export-declaration" "^7.18.6"
+ "@babel/parser" "^7.18.8"
+ "@babel/types" "^7.18.8"
debug "^4.1.0"
globals "^11.1.0"
-"@babel/types@^7.16.7", "@babel/types@^7.17.0", "@babel/types@^7.18.0", "@babel/types@^7.18.2":
- version "7.18.4"
- resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.4.tgz#27eae9b9fd18e9dccc3f9d6ad051336f307be354"
- integrity sha512-ThN1mBcMq5pG/Vm2IcBmPPfyPXbd8S02rS+OBIDENdufvqC7Z/jHPCv9IcP01277aKtDI8g/2XysBN4hA8niiw==
+"@babel/types@^7.18.6", "@babel/types@^7.18.7", "@babel/types@^7.18.8":
+ version "7.18.8"
+ resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.8.tgz#c5af199951bf41ba4a6a9a6d0d8ad722b30cd42f"
+ integrity sha512-qwpdsmraq0aJ3osLJRApsc2ouSJCdnMeZwB0DhbtHAtRpZNZCdlbRnHIgcRKzdE1g0iOGg644fzjOBcdOz9cPw==
dependencies:
- "@babel/helper-validator-identifier" "^7.16.7"
+ "@babel/helper-validator-identifier" "^7.18.6"
to-fast-properties "^2.0.0"
"@cspotcode/source-map-support@^0.8.0":
@@ -437,12 +437,12 @@
"@jridgewell/set-array" "^1.0.0"
"@jridgewell/sourcemap-codec" "^1.4.10"
-"@jridgewell/gen-mapping@^0.3.0":
- version "0.3.1"
- resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.1.tgz#cf92a983c83466b8c0ce9124fadeaf09f7c66ea9"
- integrity sha512-GcHwniMlA2z+WFPWuY8lp3fsza0I8xPFMWL5+n8LYyP6PSvPrXf4+n8stDHZY2DM0zy9sVkRDy1jDI4XGzYVqg==
+"@jridgewell/gen-mapping@^0.3.2":
+ version "0.3.2"
+ resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9"
+ integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==
dependencies:
- "@jridgewell/set-array" "^1.0.0"
+ "@jridgewell/set-array" "^1.0.1"
"@jridgewell/sourcemap-codec" "^1.4.10"
"@jridgewell/trace-mapping" "^0.3.9"
@@ -456,6 +456,11 @@
resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.1.tgz#36a6acc93987adcf0ba50c66908bd0b70de8afea"
integrity sha512-Ct5MqZkLGEXTVmQYbGtx9SVqD2fqwvdubdps5D3djjAkgkKwT918VNOz65pEHFaYTeWcukmJmH5SwsA9Tn2ObQ==
+"@jridgewell/set-array@^1.0.1":
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72"
+ integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==
+
"@jridgewell/sourcemap-codec@^1.4.10":
version "1.4.13"
resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.13.tgz#b6461fb0c2964356c469e115f504c95ad97ab88c"
@@ -477,15 +482,15 @@
"@jridgewell/resolve-uri" "^3.0.3"
"@jridgewell/sourcemap-codec" "^1.4.10"
-"@noble/hashes@1.0.0":
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.0.0.tgz#d5e38bfbdaba174805a4e649f13be9a9ed3351ae"
- integrity sha512-DZVbtY62kc3kkBtMHqwCOfXrT/hnoORy5BJ4+HU1IR59X0KWAOqsfzQPcUl/lQLlG7qXbe/fZ3r/emxtAl+sqg==
+"@noble/hashes@1.1.2":
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.1.2.tgz#e9e035b9b166ca0af657a7848eb2718f0f22f183"
+ integrity sha512-KYRCASVTv6aeUi1tsF8/vpyR7zpfs3FUzy2Jqm+MU+LmUKhQ0y2FpfwqkCcxSg2ua4GALJd8k2R76WxwZGbQpA==
-"@noble/secp256k1@1.5.5":
- version "1.5.5"
- resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.5.5.tgz#315ab5745509d1a8c8e90d0bdf59823ccf9bcfc3"
- integrity sha512-sZ1W6gQzYnu45wPrWx8D3kwI2/U29VYTx9OjbDAd7jwRItJ0cSTMPRL/C8AWZFn9kWFLQGqEXVEE86w4Z8LpIQ==
+"@noble/secp256k1@1.6.0":
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.6.0.tgz#602afbbfcfb7e169210469b697365ef740d7e930"
+ integrity sha512-DWSsg8zMHOYMYBqIQi96BQuthZrp98LCeMNcUOaffCIVYQ5yxDbNikLF+H7jEnmNNmXbtVic46iCuVWzar+MgA==
"@nodelib/fs.scandir@2.1.5":
version "2.1.5"
@@ -508,142 +513,142 @@
"@nodelib/fs.scandir" "2.1.5"
fastq "^1.6.0"
-"@polkadot/api-augment@8.7.2-15":
- version "8.7.2-15"
- resolved "https://registry.yarnpkg.com/@polkadot/api-augment/-/api-augment-8.7.2-15.tgz#a141d3cd595a39e7e2965330268b5eb92bdd5849"
- integrity sha512-QGXosX6p0RFYNhWepZCIaRiyCvHnVt5Pb6U7/77UxIszgGRHfHFDsYr4v5bGiaRTOj/E8moc2Ufi/+VgOiG9sw==
+"@polkadot/api-augment@8.12.2":
+ version "8.12.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/api-augment/-/api-augment-8.12.2.tgz#413ae9c99df0a4fb2135fee3f7b9e0caa913fcfd"
+ integrity sha512-HbvNOu6ntago8nYqLkq/HZ+gsMhbKe/sD4hPIFPruhP6OAnW6TWNIlqc2ruFx2KrT0rfzXUZ4Gmk4WgyRFuz4Q==
dependencies:
- "@babel/runtime" "^7.18.3"
- "@polkadot/api-base" "8.7.2-15"
- "@polkadot/rpc-augment" "8.7.2-15"
- "@polkadot/types" "8.7.2-15"
- "@polkadot/types-augment" "8.7.2-15"
- "@polkadot/types-codec" "8.7.2-15"
- "@polkadot/util" "^9.4.1"
+ "@babel/runtime" "^7.18.6"
+ "@polkadot/api-base" "8.12.2"
+ "@polkadot/rpc-augment" "8.12.2"
+ "@polkadot/types" "8.12.2"
+ "@polkadot/types-augment" "8.12.2"
+ "@polkadot/types-codec" "8.12.2"
+ "@polkadot/util" "^10.0.2"
-"@polkadot/api-base@8.7.2-15":
- version "8.7.2-15"
- resolved "https://registry.yarnpkg.com/@polkadot/api-base/-/api-base-8.7.2-15.tgz#c909d3bf0fbfb3cc46ca7067199e36e72b959bdb"
- integrity sha512-HXdtaqbpnfFbOazjI9CPSYM37S4mzhxUs8hLMKrWqpHL//at4tiMa5dRyev9VSKeE6gqeqCT9JTBvEAZ9eNR6Q==
+"@polkadot/api-base@8.12.2":
+ version "8.12.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/api-base/-/api-base-8.12.2.tgz#15fbf89b14d6918027b7bf7f87b218a675ae82d6"
+ integrity sha512-5rLOCulXNU/g0rUVoW6ArQjOBq/07S6oKR9nOJls6W4PUhYcBIClCTlXx2uoDszMdwhEhYyHQ67bnoTcRrYcLA==
dependencies:
- "@babel/runtime" "^7.18.3"
- "@polkadot/rpc-core" "8.7.2-15"
- "@polkadot/types" "8.7.2-15"
- "@polkadot/util" "^9.4.1"
+ "@babel/runtime" "^7.18.6"
+ "@polkadot/rpc-core" "8.12.2"
+ "@polkadot/types" "8.12.2"
+ "@polkadot/util" "^10.0.2"
rxjs "^7.5.5"
-"@polkadot/api-contract@8.7.2-15":
- version "8.7.2-15"
- resolved "https://registry.yarnpkg.com/@polkadot/api-contract/-/api-contract-8.7.2-15.tgz#687706fb4bd33c4a88187db3a269292f6e559892"
- integrity sha512-Pr1Nm5zBpW9foCKm/Q6hIT5KHCeFVE8EFSfHBgjbitYpFOGnz19kduEpa0vxIcfq2WVXcVPTQ2eqjGtHoThNqA==
+"@polkadot/api-contract@8.12.2":
+ version "8.12.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/api-contract/-/api-contract-8.12.2.tgz#9dddd83eb0ae40fce806fe2e32d319134a28ae4c"
+ integrity sha512-YuyVamnp9q5VAWN9WOYsaWKnH1/MERtCzsG5/saopgGrEjfYRqyuLA+VVFaAoxEAdPfJew0AQDHjbR2H2+C9nQ==
dependencies:
- "@babel/runtime" "^7.18.3"
- "@polkadot/api" "8.7.2-15"
- "@polkadot/types" "8.7.2-15"
- "@polkadot/types-codec" "8.7.2-15"
- "@polkadot/types-create" "8.7.2-15"
- "@polkadot/util" "^9.4.1"
- "@polkadot/util-crypto" "^9.4.1"
+ "@babel/runtime" "^7.18.6"
+ "@polkadot/api" "8.12.2"
+ "@polkadot/types" "8.12.2"
+ "@polkadot/types-codec" "8.12.2"
+ "@polkadot/types-create" "8.12.2"
+ "@polkadot/util" "^10.0.2"
+ "@polkadot/util-crypto" "^10.0.2"
rxjs "^7.5.5"
-"@polkadot/api-derive@8.7.2-15":
- version "8.7.2-15"
- resolved "https://registry.yarnpkg.com/@polkadot/api-derive/-/api-derive-8.7.2-15.tgz#b29f24d435c036c9bf5624d18a9d93196cf2c4f4"
- integrity sha512-0R3M9LFKoQ0d7elIDQjPKuV5EAHTtkU/72Lgxw2GYStsOqcnfFNomfLoLMuk8Xy4ETUAp/Kq1eMJpvsY6hSTtA==
+"@polkadot/api-derive@8.12.2":
+ version "8.12.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/api-derive/-/api-derive-8.12.2.tgz#eec954f6421356caf52584fe5c15e7d96c6c3d29"
+ integrity sha512-F7HCAVNXLQphv7OYVcq7GM5CP6RzGvYfTqutmc5GZFCDVMDY9RQA+a/3T5BIjJXrtepPa0pcYvt9fcovsazhZw==
dependencies:
- "@babel/runtime" "^7.18.3"
- "@polkadot/api" "8.7.2-15"
- "@polkadot/api-augment" "8.7.2-15"
- "@polkadot/api-base" "8.7.2-15"
- "@polkadot/rpc-core" "8.7.2-15"
- "@polkadot/types" "8.7.2-15"
- "@polkadot/types-codec" "8.7.2-15"
- "@polkadot/util" "^9.4.1"
- "@polkadot/util-crypto" "^9.4.1"
+ "@babel/runtime" "^7.18.6"
+ "@polkadot/api" "8.12.2"
+ "@polkadot/api-augment" "8.12.2"
+ "@polkadot/api-base" "8.12.2"
+ "@polkadot/rpc-core" "8.12.2"
+ "@polkadot/types" "8.12.2"
+ "@polkadot/types-codec" "8.12.2"
+ "@polkadot/util" "^10.0.2"
+ "@polkadot/util-crypto" "^10.0.2"
rxjs "^7.5.5"
-"@polkadot/api@8.7.2-15":
- version "8.7.2-15"
- resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-8.7.2-15.tgz#c7ede416e4d277c227fc93fdfdc4d27634935d08"
- integrity sha512-tzEUWsXIPzPbnpn/3LTGtJ7SXzMgCJ/da5d9q0UH3vsx1gDEjuZEWXOeSYLHgbqQSgwPukvMVuGtRjcC+A/WZQ==
+"@polkadot/api@8.12.2":
+ version "8.12.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-8.12.2.tgz#5ade99fd595b712f647cf4d63ce5a6daa6d0fff7"
+ integrity sha512-bK3bhCFqCYTx/K/89QF88jYqE3Dc1LmCwMnwpof6adlAj5DoEjRfSmKarqrZqox516Xph1+84ACNkyem0KnIWA==
dependencies:
- "@babel/runtime" "^7.18.3"
- "@polkadot/api-augment" "8.7.2-15"
- "@polkadot/api-base" "8.7.2-15"
- "@polkadot/api-derive" "8.7.2-15"
- "@polkadot/keyring" "^9.4.1"
- "@polkadot/rpc-augment" "8.7.2-15"
- "@polkadot/rpc-core" "8.7.2-15"
- "@polkadot/rpc-provider" "8.7.2-15"
- "@polkadot/types" "8.7.2-15"
- "@polkadot/types-augment" "8.7.2-15"
- "@polkadot/types-codec" "8.7.2-15"
- "@polkadot/types-create" "8.7.2-15"
- "@polkadot/types-known" "8.7.2-15"
- "@polkadot/util" "^9.4.1"
- "@polkadot/util-crypto" "^9.4.1"
+ "@babel/runtime" "^7.18.6"
+ "@polkadot/api-augment" "8.12.2"
+ "@polkadot/api-base" "8.12.2"
+ "@polkadot/api-derive" "8.12.2"
+ "@polkadot/keyring" "^10.0.2"
+ "@polkadot/rpc-augment" "8.12.2"
+ "@polkadot/rpc-core" "8.12.2"
+ "@polkadot/rpc-provider" "8.12.2"
+ "@polkadot/types" "8.12.2"
+ "@polkadot/types-augment" "8.12.2"
+ "@polkadot/types-codec" "8.12.2"
+ "@polkadot/types-create" "8.12.2"
+ "@polkadot/types-known" "8.12.2"
+ "@polkadot/util" "^10.0.2"
+ "@polkadot/util-crypto" "^10.0.2"
eventemitter3 "^4.0.7"
rxjs "^7.5.5"
-"@polkadot/keyring@^9.4.1":
- version "9.4.1"
- resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-9.4.1.tgz#4bc8d1c1962756841742abac0d7e4ef233d9c2a9"
- integrity sha512-op6Tj8E9GHeZYvEss38FRUrX+GlBj6qiwF4BlFrAvPqjPnRn8TT9NhRLroiCwvxeNg3uMtEF/5xB+vvdI0I6qw==
+"@polkadot/keyring@^10.0.2":
+ version "10.0.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-10.0.2.tgz#4e6cc008a16cf7bb1b95694857c16295ca2135ae"
+ integrity sha512-N/lx/e9alR/lUREap4hQ/YKa+CKCFIa4QOKLz8eFhpqhbA5M5nQcjrppitO+sX/XlpmbOBpbnO168cU2dA09Iw==
dependencies:
- "@babel/runtime" "^7.18.3"
- "@polkadot/util" "9.4.1"
- "@polkadot/util-crypto" "9.4.1"
+ "@babel/runtime" "^7.18.6"
+ "@polkadot/util" "10.0.2"
+ "@polkadot/util-crypto" "10.0.2"
-"@polkadot/networks@9.4.1", "@polkadot/networks@^9.4.1":
- version "9.4.1"
- resolved "https://registry.yarnpkg.com/@polkadot/networks/-/networks-9.4.1.tgz#acdf3d64421ce0e3d3ba68797fc29a28ee40c185"
- integrity sha512-ibH8bZ2/XMXv0XEsP1fGOqNnm2mg1rHo5kHXSJ3QBcZJFh1+xkI4Ovl2xrFfZ+SYATA3Wsl5R6knqimk2EqyJQ==
+"@polkadot/networks@10.0.2", "@polkadot/networks@^10.0.2":
+ version "10.0.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/networks/-/networks-10.0.2.tgz#864f08cdbd4cf7c65a82721f3008169222a53148"
+ integrity sha512-K7hUFmErTrBtkobhvFwT/oPEQrI1oVr7WfngquM+zN0oHiHzRspecxifGKsQ1kw78F7zrZKOBScW/hoJbdI8fA==
dependencies:
- "@babel/runtime" "^7.18.3"
- "@polkadot/util" "9.4.1"
- "@substrate/ss58-registry" "^1.22.0"
+ "@babel/runtime" "^7.18.6"
+ "@polkadot/util" "10.0.2"
+ "@substrate/ss58-registry" "^1.23.0"
-"@polkadot/rpc-augment@8.7.2-15":
- version "8.7.2-15"
- resolved "https://registry.yarnpkg.com/@polkadot/rpc-augment/-/rpc-augment-8.7.2-15.tgz#6175126968dfb79ba5549b03cac8c3860666e72b"
- integrity sha512-IgfkR9CHT8jDuGYkb75DBFu+yJNW32+vOt3oS0sf57VqkHketSq9rD3mtZD37V/21Q4a17yrqKQOte7mMl9kcg==
+"@polkadot/rpc-augment@8.12.2":
+ version "8.12.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/rpc-augment/-/rpc-augment-8.12.2.tgz#7afe41a6230a117485991ce108f6ffe341e72bb3"
+ integrity sha512-FKVMmkYhWJNcuXpRN9t7xTX5agSgcgniP8gNPMhL6GV8lV3Xoxs8gLgVy32xeAh7gxArN/my6LnYPtXVkdFALQ==
dependencies:
- "@babel/runtime" "^7.18.3"
- "@polkadot/rpc-core" "8.7.2-15"
- "@polkadot/types" "8.7.2-15"
- "@polkadot/types-codec" "8.7.2-15"
- "@polkadot/util" "^9.4.1"
+ "@babel/runtime" "^7.18.6"
+ "@polkadot/rpc-core" "8.12.2"
+ "@polkadot/types" "8.12.2"
+ "@polkadot/types-codec" "8.12.2"
+ "@polkadot/util" "^10.0.2"
-"@polkadot/rpc-core@8.7.2-15":
- version "8.7.2-15"
- resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-8.7.2-15.tgz#827a31adf833fb866cb5f39dbd86c5f0b44d63a4"
- integrity sha512-yGmpESOmGyzY7+D3yUxbKToz/eP/q8vDyOGajLnHn12TcnjgbAfMdc4xdU6cQex+mSsPwS0YQFuPrPXGloCOHA==
+"@polkadot/rpc-core@8.12.2":
+ version "8.12.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-8.12.2.tgz#d8d53240276f0e2df3f4e6540acbb35949a2c56e"
+ integrity sha512-RLhzNYJonfsQXYhZuyVBSsOwSgCf+8ijS3aUcv06yrFf26k7nXw2Uc4P0Io3jY/wq5LnvkKzL+HSj6j7XZ+/Sg==
dependencies:
- "@babel/runtime" "^7.18.3"
- "@polkadot/rpc-augment" "8.7.2-15"
- "@polkadot/rpc-provider" "8.7.2-15"
- "@polkadot/types" "8.7.2-15"
- "@polkadot/util" "^9.4.1"
+ "@babel/runtime" "^7.18.6"
+ "@polkadot/rpc-augment" "8.12.2"
+ "@polkadot/rpc-provider" "8.12.2"
+ "@polkadot/types" "8.12.2"
+ "@polkadot/util" "^10.0.2"
rxjs "^7.5.5"
-"@polkadot/rpc-provider@8.7.2-15":
- version "8.7.2-15"
- resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-8.7.2-15.tgz#99dd30085284442265225e0f12aef3849b7bfe44"
- integrity sha512-EwgBnUIpGhEfSanDXVviQQ784HYD3DWUPdv9pIvn9qnCZPk7o+MGPvKW73A+XbQpPV9j8tAGnVsSnbDuoSVp1g==
+"@polkadot/rpc-provider@8.12.2":
+ version "8.12.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-8.12.2.tgz#e3f6ddf98955bb4a8431342f5f9d39dc01c3555b"
+ integrity sha512-fgXKAYDmc1kGmOPa2Nuh+LsUBFvUzgzP/tOEbS5UJpoc0+azZfTLWh2AXpo/gVHblR6zZBDWrB3wmGzu6wF17A==
dependencies:
- "@babel/runtime" "^7.18.3"
- "@polkadot/keyring" "^9.4.1"
- "@polkadot/types" "8.7.2-15"
- "@polkadot/types-support" "8.7.2-15"
- "@polkadot/util" "^9.4.1"
- "@polkadot/util-crypto" "^9.4.1"
- "@polkadot/x-fetch" "^9.4.1"
- "@polkadot/x-global" "^9.4.1"
- "@polkadot/x-ws" "^9.4.1"
- "@substrate/connect" "0.7.5"
+ "@babel/runtime" "^7.18.6"
+ "@polkadot/keyring" "^10.0.2"
+ "@polkadot/types" "8.12.2"
+ "@polkadot/types-support" "8.12.2"
+ "@polkadot/util" "^10.0.2"
+ "@polkadot/util-crypto" "^10.0.2"
+ "@polkadot/x-fetch" "^10.0.2"
+ "@polkadot/x-global" "^10.0.2"
+ "@polkadot/x-ws" "^10.0.2"
+ "@substrate/connect" "0.7.7"
eventemitter3 "^4.0.7"
mock-socket "^9.1.5"
- nock "^13.2.6"
+ nock "^13.2.8"
"@polkadot/ts@0.4.22":
version "0.4.22"
@@ -652,235 +657,236 @@
dependencies:
"@types/chrome" "^0.0.171"
-"@polkadot/typegen@8.7.2-15":
- version "8.7.2-15"
- resolved "https://registry.yarnpkg.com/@polkadot/typegen/-/typegen-8.7.2-15.tgz#06e9d054db1c63d9862186429a8017b2b80bce2a"
- integrity sha512-NC8Ticirh20k1Co17D8cqQawIJ8W9HWDuq6oDyEMT4XkeBbZ1hQRO9JBO14neWDJmYJBhlUotP65jgjs8D5bMw==
+"@polkadot/typegen@8.12.2":
+ version "8.12.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/typegen/-/typegen-8.12.2.tgz#b8d4fa567b187a2987804d51c85d66e2c899748a"
+ integrity sha512-hI33NtlsrMbF22iwT/i3kZ8ZsgScR8GnYztafKVau+8lVbSiA0BCKSHtKhUA8j/G2NsI62pWezsk7pbGJCcwTQ==
dependencies:
- "@babel/core" "^7.18.2"
- "@babel/register" "^7.17.7"
- "@babel/runtime" "^7.18.3"
- "@polkadot/api" "8.7.2-15"
- "@polkadot/api-augment" "8.7.2-15"
- "@polkadot/rpc-augment" "8.7.2-15"
- "@polkadot/rpc-provider" "8.7.2-15"
- "@polkadot/types" "8.7.2-15"
- "@polkadot/types-augment" "8.7.2-15"
- "@polkadot/types-codec" "8.7.2-15"
- "@polkadot/types-create" "8.7.2-15"
- "@polkadot/types-support" "8.7.2-15"
- "@polkadot/util" "^9.4.1"
- "@polkadot/x-ws" "^9.4.1"
+ "@babel/core" "^7.18.6"
+ "@babel/register" "^7.18.6"
+ "@babel/runtime" "^7.18.6"
+ "@polkadot/api" "8.12.2"
+ "@polkadot/api-augment" "8.12.2"
+ "@polkadot/rpc-augment" "8.12.2"
+ "@polkadot/rpc-provider" "8.12.2"
+ "@polkadot/types" "8.12.2"
+ "@polkadot/types-augment" "8.12.2"
+ "@polkadot/types-codec" "8.12.2"
+ "@polkadot/types-create" "8.12.2"
+ "@polkadot/types-support" "8.12.2"
+ "@polkadot/util" "^10.0.2"
+ "@polkadot/util-crypto" "^10.0.2"
+ "@polkadot/x-ws" "^10.0.2"
handlebars "^4.7.7"
websocket "^1.0.34"
yargs "^17.5.1"
-"@polkadot/types-augment@8.7.2-15":
- version "8.7.2-15"
- resolved "https://registry.yarnpkg.com/@polkadot/types-augment/-/types-augment-8.7.2-15.tgz#7ab077a1a31190ad17183196efb1da065c0d0bcd"
- integrity sha512-th1jVBDqpyQVB2gCNzo/HV0dIeNinjyPla01BFdhQ5mDKYXJ8fugsLCk5oKUPpItBrj+5NWCgynVvCwm0YJw3g==
+"@polkadot/types-augment@8.12.2":
+ version "8.12.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/types-augment/-/types-augment-8.12.2.tgz#b43d21a993d7cf8c7cd4721a2327e19dd924d255"
+ integrity sha512-47+T12u7HV+g22KryirG7fik5lU1tHgu39wLv8YZ/6jD1hVvgE632fvaCp4qje1F3M82aXobfekO+WOPLCZVsg==
dependencies:
- "@babel/runtime" "^7.18.3"
- "@polkadot/types" "8.7.2-15"
- "@polkadot/types-codec" "8.7.2-15"
- "@polkadot/util" "^9.4.1"
+ "@babel/runtime" "^7.18.6"
+ "@polkadot/types" "8.12.2"
+ "@polkadot/types-codec" "8.12.2"
+ "@polkadot/util" "^10.0.2"
-"@polkadot/types-codec@8.7.2-15":
- version "8.7.2-15"
- resolved "https://registry.yarnpkg.com/@polkadot/types-codec/-/types-codec-8.7.2-15.tgz#6afa4ff45dc7afb9250f283f70a40be641367941"
- integrity sha512-k8t7/Ern7sY4ZKQc5cYY3h1bg7/GAEaTPmKz094DhPJmEhi3NNgeJ4uyeB/JYCo5GbxXQG6W2M021s582urjMw==
+"@polkadot/types-codec@8.12.2":
+ version "8.12.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/types-codec/-/types-codec-8.12.2.tgz#7bec61d0ba751bb2cd72f93b5b81d058fa4affc5"
+ integrity sha512-NDa2ZJpJMWC9Un3PtvkyJF86M80gLqSmPyjIR8xxp0DzcD5EsCL8EV79xcOWUGm2lws1C66a4t4He/8ZwPNUqg==
dependencies:
- "@babel/runtime" "^7.18.3"
- "@polkadot/util" "^9.4.1"
+ "@babel/runtime" "^7.18.6"
+ "@polkadot/util" "^10.0.2"
+ "@polkadot/x-bigint" "^10.0.2"
-"@polkadot/types-create@8.7.2-15":
- version "8.7.2-15"
- resolved "https://registry.yarnpkg.com/@polkadot/types-create/-/types-create-8.7.2-15.tgz#106a11eb71dc2743b140d8640a3b3e7fc5ccf10e"
- integrity sha512-xB9jAJ3XQh/U05b+X77m5TPh4N9oBwwpePkAmLhovTSOSeobj7qeUKrZqccs0BSxJnJPlLwrwuusjeTtTfZCHw==
+"@polkadot/types-create@8.12.2":
+ version "8.12.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/types-create/-/types-create-8.12.2.tgz#f5fa6e1b1eb2b60372cd61950b1ab1c4482bcfd6"
+ integrity sha512-D+Sfj+TwvipO+wl4XbsVkw5AgFdpy5O2JY88CV6L26EGU2OqCcTuenwSGdrsiLWW65m97q9lP7SUphUh39vBhA==
dependencies:
- "@babel/runtime" "^7.18.3"
- "@polkadot/types-codec" "8.7.2-15"
- "@polkadot/util" "^9.4.1"
+ "@babel/runtime" "^7.18.6"
+ "@polkadot/types-codec" "8.12.2"
+ "@polkadot/util" "^10.0.2"
-"@polkadot/types-known@8.7.2-15":
- version "8.7.2-15"
- resolved "https://registry.yarnpkg.com/@polkadot/types-known/-/types-known-8.7.2-15.tgz#171b8d3963a5c38d46f98a7c14be59033f9a4da8"
- integrity sha512-c5YuuauPCu70chDnV7Fphh7SbAQl8JWj+PoY37I5BACCNFxtUx5KnP93BChiD0QxcHs2QqD6RdjW6O7cVRUKfA==
+"@polkadot/types-known@8.12.2":
+ version "8.12.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/types-known/-/types-known-8.12.2.tgz#1b8a18be24b4ee624b90831870d9db227f3cb769"
+ integrity sha512-8HCZ3AkczBrCl+TUZD0+2ubLr0BQx+0f/Nnl9yuz1pWygmSEpHrYspmFtDdpMJnNTGZo8vHNOa7smdlijJqlhw==
dependencies:
- "@babel/runtime" "^7.18.3"
- "@polkadot/networks" "^9.4.1"
- "@polkadot/types" "8.7.2-15"
- "@polkadot/types-codec" "8.7.2-15"
- "@polkadot/types-create" "8.7.2-15"
- "@polkadot/util" "^9.4.1"
+ "@babel/runtime" "^7.18.6"
+ "@polkadot/networks" "^10.0.2"
+ "@polkadot/types" "8.12.2"
+ "@polkadot/types-codec" "8.12.2"
+ "@polkadot/types-create" "8.12.2"
+ "@polkadot/util" "^10.0.2"
-"@polkadot/types-support@8.7.2-15":
- version "8.7.2-15"
- resolved "https://registry.yarnpkg.com/@polkadot/types-support/-/types-support-8.7.2-15.tgz#2d726e3d5615383ca97db3f32ee21e2aad077fcb"
- integrity sha512-Tl6xm9r/uqrKQK1OUdi5X9MaTgplBYPj3tY9677ZPV7QGYWt0Uz912u9fC2v0PGNReDXtzvrlgvk0aoErwzF5Q==
+"@polkadot/types-support@8.12.2":
+ version "8.12.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/types-support/-/types-support-8.12.2.tgz#b4f999cc63da21d8b73de621035c9d3e75386d8b"
+ integrity sha512-tTksJ4COcVonu/beWQKkF/6fKaArmTwM6iCuxn2PuJziS2Cm1+7D8Rh3ODwwZOseFvHPEco6jnb4DWNclXbZiA==
dependencies:
- "@babel/runtime" "^7.18.3"
- "@polkadot/util" "^9.4.1"
+ "@babel/runtime" "^7.18.6"
+ "@polkadot/util" "^10.0.2"
-"@polkadot/types@8.7.2-15":
- version "8.7.2-15"
- resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-8.7.2-15.tgz#5b25b6b76c916637a1d15133b5880a73079e65bc"
- integrity sha512-KfJKzk6/Ta8vZVJH8+xYYPvd9SD+4fdl4coGgKuPGYZFsjDGnYvAX4ls6/WKby51JK5s24sqaUP3vZisIgh4wA==
+"@polkadot/types@8.12.2":
+ version "8.12.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-8.12.2.tgz#c5fd35e1d5cfc52b64b6968b16950d7ab19bb8f7"
+ integrity sha512-hOqLunz4YH51B6AvuemX1cXKf+O8pehEoP3lH+FRKfJ7wyVhqa3WA+aUXhoTQBIuSiOjjC/FEJrRO5AoNO2iCg==
dependencies:
- "@babel/runtime" "^7.18.3"
- "@polkadot/keyring" "^9.4.1"
- "@polkadot/types-augment" "8.7.2-15"
- "@polkadot/types-codec" "8.7.2-15"
- "@polkadot/types-create" "8.7.2-15"
- "@polkadot/util" "^9.4.1"
- "@polkadot/util-crypto" "^9.4.1"
+ "@babel/runtime" "^7.18.6"
+ "@polkadot/keyring" "^10.0.2"
+ "@polkadot/types-augment" "8.12.2"
+ "@polkadot/types-codec" "8.12.2"
+ "@polkadot/types-create" "8.12.2"
+ "@polkadot/util" "^10.0.2"
+ "@polkadot/util-crypto" "^10.0.2"
rxjs "^7.5.5"
-"@polkadot/util-crypto@9.4.1", "@polkadot/util-crypto@^9.4.1":
- version "9.4.1"
- resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-9.4.1.tgz#af50d9b3e3fcf9760ee8eb262b1cc61614c21d98"
- integrity sha512-V6xMOjdd8Kt/QmXlcDYM4WJDAmKuH4vWSlIcMmkFHnwH/NtYVdYIDZswLQHKL8gjLijPfVTHpWaJqNFhGpZJEg==
+"@polkadot/util-crypto@10.0.2", "@polkadot/util-crypto@^10.0.2":
+ version "10.0.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-10.0.2.tgz#4fd78ebe8d8d95089c8bbff1e4e416fd03f9df4f"
+ integrity sha512-0uJFvu5cpRBep0/AcpA8vnXH3gnoe+ADiMKD93AekjxrOVqlrjVHKIf+FbiGv1paRKISxoO5Q2j7nCvDsi1q5w==
dependencies:
- "@babel/runtime" "^7.18.3"
- "@noble/hashes" "1.0.0"
- "@noble/secp256k1" "1.5.5"
- "@polkadot/networks" "9.4.1"
- "@polkadot/util" "9.4.1"
- "@polkadot/wasm-crypto" "^6.1.1"
- "@polkadot/x-bigint" "9.4.1"
- "@polkadot/x-randomvalues" "9.4.1"
- "@scure/base" "1.0.0"
+ "@babel/runtime" "^7.18.6"
+ "@noble/hashes" "1.1.2"
+ "@noble/secp256k1" "1.6.0"
+ "@polkadot/networks" "10.0.2"
+ "@polkadot/util" "10.0.2"
+ "@polkadot/wasm-crypto" "^6.2.3"
+ "@polkadot/x-bigint" "10.0.2"
+ "@polkadot/x-randomvalues" "10.0.2"
+ "@scure/base" "1.1.1"
ed2curve "^0.3.0"
tweetnacl "^1.0.3"
-"@polkadot/util@9.4.1", "@polkadot/util@^9.4.1":
- version "9.4.1"
- resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-9.4.1.tgz#49446e88b1231b0716bf6b4eb4818145f08a1294"
- integrity sha512-z0HcnIe3zMWyK1s09wQIwc1M8gDKygSF9tDAbC8H9KDeIRZB2ldhwWEFx/1DJGOgFFrmRfkxeC6dcDpfzQhFow==
+"@polkadot/util@10.0.2", "@polkadot/util@^10.0.2":
+ version "10.0.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-10.0.2.tgz#0ef2b7f5c4e884147c2fd58c4d55f2ee0c437a9a"
+ integrity sha512-jE1b6Zzltsb/GJV5sFmTSQOlYLd3fipY+DeLS9J+BbsWZW6uUc5x+FNm4pLrYxF1IqiZxwBv1Vi89L14uWZ1rw==
dependencies:
- "@babel/runtime" "^7.18.3"
- "@polkadot/x-bigint" "9.4.1"
- "@polkadot/x-global" "9.4.1"
- "@polkadot/x-textdecoder" "9.4.1"
- "@polkadot/x-textencoder" "9.4.1"
+ "@babel/runtime" "^7.18.6"
+ "@polkadot/x-bigint" "10.0.2"
+ "@polkadot/x-global" "10.0.2"
+ "@polkadot/x-textdecoder" "10.0.2"
+ "@polkadot/x-textencoder" "10.0.2"
"@types/bn.js" "^5.1.0"
bn.js "^5.2.1"
- ip-regex "^4.3.0"
-"@polkadot/wasm-bridge@6.1.1":
- version "6.1.1"
- resolved "https://registry.yarnpkg.com/@polkadot/wasm-bridge/-/wasm-bridge-6.1.1.tgz#9342f2b3c139df72fa45c8491b348f8ebbfa57fa"
- integrity sha512-Cy0k00VCu+HWxie+nn9GWPlSPdiZl8Id8ulSGA2FKET0jIbffmOo4e1E2FXNucfR1UPEpqov5BCF9T5YxEXZDg==
+"@polkadot/wasm-bridge@6.2.3":
+ version "6.2.3"
+ resolved "https://registry.yarnpkg.com/@polkadot/wasm-bridge/-/wasm-bridge-6.2.3.tgz#44430710b6f0e7393a69b15decc9123ef5f7ff45"
+ integrity sha512-kDPcUF5uCZJeJUlWtjk6u4KRy+RTObZbIMgZKiuCcQn9n3EYWadONvStfIyKaiFCc3VFVivzH1cUwTFxxTNHHQ==
dependencies:
- "@babel/runtime" "^7.17.9"
+ "@babel/runtime" "^7.18.6"
-"@polkadot/wasm-crypto-asmjs@6.1.1":
- version "6.1.1"
- resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-asmjs/-/wasm-crypto-asmjs-6.1.1.tgz#6d09045679120b43fbfa435b29c3690d1f788ebb"
- integrity sha512-gG4FStVumkyRNH7WcTB+hn3EEwCssJhQyi4B1BOUt+eYYmw9xJdzIhqjzSd9b/yF2e5sRaAzfnMj2srGufsE6A==
+"@polkadot/wasm-crypto-asmjs@6.2.3":
+ version "6.2.3"
+ resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-asmjs/-/wasm-crypto-asmjs-6.2.3.tgz#f2e3076bb6013431045d48a56b5ae107cb210e20"
+ integrity sha512-d/eH02d/XB/vIGIQwyoFB4zNRb3h5PlWoXolGeVSuoa8476ouEdaWhy64mFwXBmjfluaeCOFXRs+QbxetwrDZg==
dependencies:
- "@babel/runtime" "^7.17.9"
+ "@babel/runtime" "^7.18.6"
-"@polkadot/wasm-crypto-init@6.1.1":
- version "6.1.1"
- resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-init/-/wasm-crypto-init-6.1.1.tgz#73731071bea9b4e22b380d75099da9dc683fadf5"
- integrity sha512-rbBm/9FOOUjISL4gGNokjcKy2X+Af6Chaet4zlabatpImtPIAK26B2UUBGoaRUnvl/w6K3+GwBL4LuBC+CvzFw==
+"@polkadot/wasm-crypto-init@6.2.3":
+ version "6.2.3"
+ resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-init/-/wasm-crypto-init-6.2.3.tgz#0cf3b59e6492cc63bb8dfb0e238fc599697af5a7"
+ integrity sha512-jDFD4ITWbvFgsGiRI61lrzI/eobG8VrI9nVCiDBqQZK7mNnGkyIdnFD1prW36uiv6/tkqSiGGvdb7dEKtmsB+Q==
dependencies:
- "@babel/runtime" "^7.17.9"
- "@polkadot/wasm-bridge" "6.1.1"
- "@polkadot/wasm-crypto-asmjs" "6.1.1"
- "@polkadot/wasm-crypto-wasm" "6.1.1"
+ "@babel/runtime" "^7.18.6"
+ "@polkadot/wasm-bridge" "6.2.3"
+ "@polkadot/wasm-crypto-asmjs" "6.2.3"
+ "@polkadot/wasm-crypto-wasm" "6.2.3"
-"@polkadot/wasm-crypto-wasm@6.1.1":
- version "6.1.1"
- resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-wasm/-/wasm-crypto-wasm-6.1.1.tgz#3fdc8f1280710e4d68112544b2473e811c389a2a"
- integrity sha512-zkz5Ct4KfTBT+YNEA5qbsHhTV58/FAxDave8wYIOaW4TrBnFPPs+J0WBWlGFertgIhPkvjFnQC/xzRyhet9prg==
+"@polkadot/wasm-crypto-wasm@6.2.3":
+ version "6.2.3"
+ resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-wasm/-/wasm-crypto-wasm-6.2.3.tgz#3b47346779881c714e1130374b2f325db9c4fdbf"
+ integrity sha512-bYRhYPcR4MBLAZz8liozr8E11r7j6RLkNHu80z65lZ5AWgjDu2MgYfKxZFWZxg8rB6+V1uYFmb7czUiSWOn4Rg==
dependencies:
- "@babel/runtime" "^7.17.9"
- "@polkadot/wasm-util" "6.1.1"
+ "@babel/runtime" "^7.18.6"
+ "@polkadot/wasm-util" "6.2.3"
-"@polkadot/wasm-crypto@^6.1.1":
- version "6.1.1"
- resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto/-/wasm-crypto-6.1.1.tgz#8e2c2d64d24eeaa78eb0b74ea1c438b7bc704176"
- integrity sha512-hv9RCbMYtgjCy7+FKZFnO2Afu/whax9sk6udnZqGRBRiwaNagtyliWZGrKNGvaXMIO0VyaY4jWUwSzUgPrLu1A==
+"@polkadot/wasm-crypto@^6.2.3":
+ version "6.2.3"
+ resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto/-/wasm-crypto-6.2.3.tgz#1b52c834a1f609d6820035d61cdfda962990ec57"
+ integrity sha512-Jq08uX16YYySanwN/37n/ZzOFv8T2H4NzLaQNjSGNbFdmKzkrlpw369XRNIVhrKGtK4v09O5ZaF5P9qc0EHgsg==
dependencies:
- "@babel/runtime" "^7.17.9"
- "@polkadot/wasm-bridge" "6.1.1"
- "@polkadot/wasm-crypto-asmjs" "6.1.1"
- "@polkadot/wasm-crypto-init" "6.1.1"
- "@polkadot/wasm-crypto-wasm" "6.1.1"
- "@polkadot/wasm-util" "6.1.1"
+ "@babel/runtime" "^7.18.6"
+ "@polkadot/wasm-bridge" "6.2.3"
+ "@polkadot/wasm-crypto-asmjs" "6.2.3"
+ "@polkadot/wasm-crypto-init" "6.2.3"
+ "@polkadot/wasm-crypto-wasm" "6.2.3"
+ "@polkadot/wasm-util" "6.2.3"
-"@polkadot/wasm-util@6.1.1":
- version "6.1.1"
- resolved "https://registry.yarnpkg.com/@polkadot/wasm-util/-/wasm-util-6.1.1.tgz#58a566aba68f90d2a701c78ad49a1a9521b17f5b"
- integrity sha512-DgpLoFXMT53UKcfZ8eT2GkJlJAOh89AWO+TP6a6qeZQpvXVe5f1yR45WQpkZlgZyUP+/19+kY56GK0pQxfslqg==
+"@polkadot/wasm-util@6.2.3":
+ version "6.2.3"
+ resolved "https://registry.yarnpkg.com/@polkadot/wasm-util/-/wasm-util-6.2.3.tgz#ffccbda4023810ac0e19327830c9bc0d4a5023bc"
+ integrity sha512-8BQ9gVSrjdc0MPWN9qtNWlMiK+J8dICu1gZJ+cy/hqKjer2MzwX4SeW2wyL5MkYYHjih3ajMRSoSA+/eY2iEwg==
dependencies:
- "@babel/runtime" "^7.17.9"
+ "@babel/runtime" "^7.18.6"
-"@polkadot/x-bigint@9.4.1":
- version "9.4.1"
- resolved "https://registry.yarnpkg.com/@polkadot/x-bigint/-/x-bigint-9.4.1.tgz#0a7c6b5743a6fb81ab6a1c3a48a584e774c37910"
- integrity sha512-KlbXboegENoyrpjj+eXfY13vsqrXgk4620zCAUhKNH622ogdvAepHbY/DpV6w0FLEC6MwN9zd5cRuDBEXVeWiw==
+"@polkadot/x-bigint@10.0.2", "@polkadot/x-bigint@^10.0.2":
+ version "10.0.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/x-bigint/-/x-bigint-10.0.2.tgz#8b69e1adf59444a6fb4397f9869ec1a9a0de1b1a"
+ integrity sha512-LtfPi+AyZDNe8jQGVmyDfxGyQDdM6ISZEwJD1ieGd4eUbOkfPmn+1t+0rjtxjISZcyP40fSFcLxtL191jDV8Bw==
dependencies:
- "@babel/runtime" "^7.18.3"
- "@polkadot/x-global" "9.4.1"
+ "@babel/runtime" "^7.18.6"
+ "@polkadot/x-global" "10.0.2"
-"@polkadot/x-fetch@^9.4.1":
- version "9.4.1"
- resolved "https://registry.yarnpkg.com/@polkadot/x-fetch/-/x-fetch-9.4.1.tgz#92802d3880db826a90bf1be90174a9fc73fc044a"
- integrity sha512-CZFPZKgy09TOF5pOFRVVhGrAaAPdSMyrUSKwdO2I8DzdIE1tmjnol50dlnZja5t8zTD0n1uIY1H4CEWwc5NF/g==
+"@polkadot/x-fetch@^10.0.2":
+ version "10.0.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/x-fetch/-/x-fetch-10.0.2.tgz#d9e2f2115a3c684fdaa8b9496540f0f421ee3719"
+ integrity sha512-vsizrcBNeRWWJhE4ZoCUJ0c68wvy3PiR9jH//B1PTV6OaqpdalpwXG6Xtpli8yc0hOOUH/87u8b/x2f/2vhZcQ==
dependencies:
- "@babel/runtime" "^7.18.3"
- "@polkadot/x-global" "9.4.1"
- "@types/node-fetch" "^2.6.1"
- node-fetch "^2.6.7"
+ "@babel/runtime" "^7.18.6"
+ "@polkadot/x-global" "10.0.2"
+ "@types/node-fetch" "^2.6.2"
+ node-fetch "^3.2.6"
-"@polkadot/x-global@9.4.1", "@polkadot/x-global@^9.4.1":
- version "9.4.1"
- resolved "https://registry.yarnpkg.com/@polkadot/x-global/-/x-global-9.4.1.tgz#3bd44862ea2b7e0fb2de766dfa4d56bb46d19e17"
- integrity sha512-eN4oZeRdIKQeUPNN7OtH5XeYp349d8V9+gW6W0BmCfB2lTg8TDlG1Nj+Cyxpjl9DNF5CiKudTq72zr0dDSRbwA==
+"@polkadot/x-global@10.0.2", "@polkadot/x-global@^10.0.2":
+ version "10.0.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/x-global/-/x-global-10.0.2.tgz#c60b279a34f8a589d076a03978331e9e6a26d283"
+ integrity sha512-IlxSH36RjcQTImufaJCtvommMmkNWbwOy+/Z7FEOKUOcoiPaUhHU3CzWser+EtClckx7qPLY5lZ59Pxf7HWupQ==
dependencies:
- "@babel/runtime" "^7.18.3"
+ "@babel/runtime" "^7.18.6"
-"@polkadot/x-randomvalues@9.4.1":
- version "9.4.1"
- resolved "https://registry.yarnpkg.com/@polkadot/x-randomvalues/-/x-randomvalues-9.4.1.tgz#ab995b3a22aee6bffc18490e636e1a7409f36a15"
- integrity sha512-TLOQw3JNPgCrcq9WO2ipdeG8scsSreu3m9hwj3n7nX/QKlVzSf4G5bxJo5TW1dwcUdHwBuVox+3zgCmo+NPh+Q==
+"@polkadot/x-randomvalues@10.0.2":
+ version "10.0.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/x-randomvalues/-/x-randomvalues-10.0.2.tgz#b51d58d235e4fae5201f4ef633ee71d8bf23c125"
+ integrity sha512-kYbNeeOaDEnNqVhIgh8ds9YC79Tji5/HDqQymx7Xb3YmTagdOAe2klrTRJzVfsUKljzhlVOuF3Zcf/PRNbt/2w==
dependencies:
- "@babel/runtime" "^7.18.3"
- "@polkadot/x-global" "9.4.1"
+ "@babel/runtime" "^7.18.6"
+ "@polkadot/x-global" "10.0.2"
-"@polkadot/x-textdecoder@9.4.1":
- version "9.4.1"
- resolved "https://registry.yarnpkg.com/@polkadot/x-textdecoder/-/x-textdecoder-9.4.1.tgz#1d891b82f4192d92dd373d14ea4b5654d0130484"
- integrity sha512-yLulcgVASFUBJqrvS6Ssy0ko9teAfbu1ajH0r3Jjnqkpmmz2DJ1CS7tAktVa7THd4GHPGeKAVfxl+BbV/LZl+w==
+"@polkadot/x-textdecoder@10.0.2":
+ version "10.0.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/x-textdecoder/-/x-textdecoder-10.0.2.tgz#082ee7d5c2e71985e584a858c7b6069dd59475bd"
+ integrity sha512-EI1+Osrfadtm4XFfdcjYgV/1yYoPoFaIJfZiPphPSy/4Ceeblmz9T2hWPdJ3uWtPpk6FkhxudB44Y1JuCwXBjg==
dependencies:
- "@babel/runtime" "^7.18.3"
- "@polkadot/x-global" "9.4.1"
+ "@babel/runtime" "^7.18.6"
+ "@polkadot/x-global" "10.0.2"
-"@polkadot/x-textencoder@9.4.1":
- version "9.4.1"
- resolved "https://registry.yarnpkg.com/@polkadot/x-textencoder/-/x-textencoder-9.4.1.tgz#09c47727d7713884cf82fd773e478487fe39d479"
- integrity sha512-/47wa31jBa43ULqMO60vzcJigTG+ZAGNcyT5r6hFLrQzRzc8nIBjIOD8YWtnKM92r9NvlNv2wJhdamqyU0mntg==
+"@polkadot/x-textencoder@10.0.2":
+ version "10.0.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/x-textencoder/-/x-textencoder-10.0.2.tgz#f3e632ca6d852d3284e6aeef3806bf4450490bf0"
+ integrity sha512-iTLC700ExtRFsP+fE+dA5CO0xjQ46XeQqbJxa7wJK3aKrzpogyTLZXc0O5ISE1xltOmsQSA9QOELMP113kZkvA==
dependencies:
- "@babel/runtime" "^7.18.3"
- "@polkadot/x-global" "9.4.1"
+ "@babel/runtime" "^7.18.6"
+ "@polkadot/x-global" "10.0.2"
-"@polkadot/x-ws@^9.4.1":
- version "9.4.1"
- resolved "https://registry.yarnpkg.com/@polkadot/x-ws/-/x-ws-9.4.1.tgz#c48f2ef3e80532f4b366b57b6661429b46a16155"
- integrity sha512-zQjVxXgHsBVn27u4bjY01cFO6XWxgv2b3MMOpNHTKTAs8SLEmFf0LcT7fBShimyyudyTeJld5pHApJ4qp1OXxA==
+"@polkadot/x-ws@^10.0.2":
+ version "10.0.2"
+ resolved "https://registry.yarnpkg.com/@polkadot/x-ws/-/x-ws-10.0.2.tgz#505f33911e301fb1aa07cf0807de738ef52414a5"
+ integrity sha512-eH8WJ6jKobfUGLRAGj65wKUB2pwbT7RflebQbbcG8Khx9INRjuwLGc+jAiuf0StOZiqVVJsMUayVgsddO8hIvQ==
dependencies:
- "@babel/runtime" "^7.18.3"
- "@polkadot/x-global" "9.4.1"
+ "@babel/runtime" "^7.18.6"
+ "@polkadot/x-global" "10.0.2"
"@types/websocket" "^1.0.5"
websocket "^1.0.34"
-"@scure/base@1.0.0":
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.0.0.tgz#109fb595021de285f05a7db6806f2f48296fcee7"
- integrity sha512-gIVaYhUsy+9s58m/ETjSJVKHhKTBMmcRb9cEV5/5dwvfDlfORjKrFsDeDHWRrm6RjcPvCLZFwGJjAjLj1gg4HA==
+"@scure/base@1.1.1":
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.1.tgz#ebb651ee52ff84f420097055f4bf46cfba403938"
+ integrity sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA==
"@sindresorhus/is@^0.14.0":
version "0.14.0"
@@ -892,28 +898,28 @@
resolved "https://registry.yarnpkg.com/@substrate/connect-extension-protocol/-/connect-extension-protocol-1.0.0.tgz#d452beda84b3ebfcf0e88592a4695e729a91e858"
integrity sha512-nFVuKdp71hMd/MGlllAOh+a2hAqt8m6J2G0aSsS/RcALZexxF9jodbFc62ni8RDtJboeOfXAHhenYOANvJKPIg==
-"@substrate/connect@0.7.5":
- version "0.7.5"
- resolved "https://registry.yarnpkg.com/@substrate/connect/-/connect-0.7.5.tgz#8d868ed905df25c87ff9bad9fa8db6d4137012c9"
- integrity sha512-sdAZ6IGuTNxRGlH/O+6IaXvkYzZFwMK03VbQMgxUzry9dz1+JzyaNf8iOTVHxhMIUZc0h0E90JQz/hNiUYPlUw==
+"@substrate/connect@0.7.7":
+ version "0.7.7"
+ resolved "https://registry.yarnpkg.com/@substrate/connect/-/connect-0.7.7.tgz#6d162fcec2f5cfb78c137a82dbb35692655fbe2c"
+ integrity sha512-uFRF06lC42ZZixxwkzRB61K1uYvR1cTZ7rI98RW7T+eWbCFrafyVk0pk6J+4oN05gZkhou+VK3hrRCU6Doy2xQ==
dependencies:
"@substrate/connect-extension-protocol" "^1.0.0"
- "@substrate/smoldot-light" "0.6.16"
+ "@substrate/smoldot-light" "0.6.19"
eventemitter3 "^4.0.7"
-"@substrate/smoldot-light@0.6.16":
- version "0.6.16"
- resolved "https://registry.yarnpkg.com/@substrate/smoldot-light/-/smoldot-light-0.6.16.tgz#04ec70cf1df285431309fe5704d3b2dd701faa0b"
- integrity sha512-Ej0ZdNPTW0EXbp45gv/5Kt/JV+c9cmRZRYAXg+EALxXPm0hW9h2QdVLm61A2PAskOGptW4wnJ1WzzruaenwAXQ==
+"@substrate/smoldot-light@0.6.19":
+ version "0.6.19"
+ resolved "https://registry.yarnpkg.com/@substrate/smoldot-light/-/smoldot-light-0.6.19.tgz#13e897ca9839aecb0dac4ce079ff1cca1dc54cc0"
+ integrity sha512-Xi+v1cdURhTwx7NH+9fa1U9m7VGP61GvB6qwev9HrZXlGbQiUIvySxPlH/LMsq3mwgiRYkokPhcaZEHufY7Urg==
dependencies:
buffer "^6.0.1"
pako "^2.0.4"
websocket "^1.0.32"
-"@substrate/ss58-registry@^1.22.0":
- version "1.22.0"
- resolved "https://registry.yarnpkg.com/@substrate/ss58-registry/-/ss58-registry-1.22.0.tgz#d115bc5dcab8c0f5800e05e4ef265949042b13ec"
- integrity sha512-IKqrPY0B3AeIXEc5/JGgEhPZLy+SmVyQf+k0SIGcNSTqt1GLI3gQFEOFwSScJdem+iYZQUrn6YPPxC3TpdSC3A==
+"@substrate/ss58-registry@^1.23.0":
+ version "1.23.0"
+ resolved "https://registry.yarnpkg.com/@substrate/ss58-registry/-/ss58-registry-1.23.0.tgz#6212bf871a882da98799f8dc51de0944d4152b88"
+ integrity sha512-LuQje7n48GXSsp1aGI6UEmNVtlh7OzQ6CN1Hd9VGUrshADwMB0lRZ5bxnffmqDR4vVugI7h0NN0AONhIW1eHGg==
"@szmarczak/http-timer@^1.1.2":
version "1.1.2"
@@ -1010,10 +1016,10 @@
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-9.1.1.tgz#e7c4f1001eefa4b8afbd1eee27a237fee3bf29c4"
integrity sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==
-"@types/node-fetch@^2.6.1":
- version "2.6.1"
- resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.1.tgz#8f127c50481db65886800ef496f20bbf15518975"
- integrity sha512-oMqjURCaxoSIsHSr1E47QHzbmzNR5rK8McHuNb11BOM9cHcIK3Avy0s/b2JlXHoQGTYS3NsvWzV1M0iK7l0wbA==
+"@types/node-fetch@^2.6.2":
+ version "2.6.2"
+ resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.2.tgz#d1a9c5fd049d9415dce61571557104dec3ec81da"
+ integrity sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==
dependencies:
"@types/node" "*"
form-data "^3.0.0"
@@ -1855,6 +1861,11 @@
dependencies:
assert-plus "^1.0.0"
+data-uri-to-buffer@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.0.tgz#b5db46aea50f6176428ac05b73be39a57701a64b"
+ integrity sha512-Vr3mLBA8qWmcuschSLAOogKgQ/Jwxulv3RNE4FXnYWRGujzrRWQI4m12fQqRkwX06C0KanhLr4hK+GydchZsaA==
+
debug@2.6.9, debug@^2.2.0:
version "2.6.9"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
@@ -2426,6 +2437,14 @@
dependencies:
reusify "^1.0.4"
+fetch-blob@^3.1.2, fetch-blob@^3.1.4:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-3.2.0.tgz#f09b8d4bbd45adc6f0c20b7e787e793e309dcce9"
+ integrity sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==
+ dependencies:
+ node-domexception "^1.0.0"
+ web-streams-polyfill "^3.0.3"
+
file-entry-cache@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027"
@@ -2539,6 +2558,13 @@
combined-stream "^1.0.6"
mime-types "^2.1.12"
+formdata-polyfill@^4.0.10:
+ version "4.0.10"
+ resolved "https://registry.yarnpkg.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz#24807c31c9d402e002ab3d8c720144ceb8848423"
+ integrity sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==
+ dependencies:
+ fetch-blob "^3.1.2"
+
forwarded@0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811"
@@ -2968,11 +2994,6 @@
has "^1.0.3"
side-channel "^1.0.4"
-ip-regex@^4.3.0:
- version "4.3.0"
- resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-4.3.0.tgz#687275ab0f57fa76978ff8f4dddc8a23d5990db5"
- integrity sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q==
-
ipaddr.js@1.9.1:
version "1.9.1"
resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3"
@@ -3631,10 +3652,10 @@
resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.1.0.tgz#1836ee30ad56d67ef281b22bd199f709449b35eb"
integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==
-nock@^13.2.6:
- version "13.2.6"
- resolved "https://registry.yarnpkg.com/nock/-/nock-13.2.6.tgz#35e419cd9d385ffa67e59523d9699e41b29e1a03"
- integrity sha512-GbyeSwSEP0FYouzETZ0l/XNm5tNcDNcXJKw3LCAb+mx8bZSwg1wEEvdL0FAyg5TkBJYiWSCtw6ag4XfmBy60FA==
+nock@^13.2.8:
+ version "13.2.8"
+ resolved "https://registry.yarnpkg.com/nock/-/nock-13.2.8.tgz#e2043ccaa8e285508274575e090a7fe1e46b90f1"
+ integrity sha512-JT42FrXfQRpfyL4cnbBEJdf4nmBpVP0yoCcSBr+xkT8Q1y3pgtaCKHGAAOIFcEJ3O3t0QbVAmid0S0f2bj3Wpg==
dependencies:
debug "^4.1.0"
json-stringify-safe "^5.0.1"
@@ -3646,12 +3667,19 @@
resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32"
integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==
-node-fetch@^2.6.7:
- version "2.6.7"
- resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad"
- integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==
+node-domexception@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5"
+ integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==
+
+node-fetch@^3.2.6:
+ version "3.2.6"
+ resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.2.6.tgz#6d4627181697a9d9674aae0d61548e0d629b31b9"
+ integrity sha512-LAy/HZnLADOVkVPubaxHDft29booGglPFDr2Hw0J1AercRh01UiVFm++KMDnJeH9sHgNB4hsXPii7Sgym/sTbw==
dependencies:
- whatwg-url "^5.0.0"
+ data-uri-to-buffer "^4.0.0"
+ fetch-blob "^3.1.4"
+ formdata-polyfill "^4.0.10"
node-gyp-build@^4.2.0, node-gyp-build@^4.3.0:
version "4.4.0"
@@ -4518,11 +4546,6 @@
psl "^1.1.28"
punycode "^2.1.1"
-tr46@~0.0.3:
- version "0.0.3"
- resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a"
- integrity sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=
-
ts-node@^10.8.0:
version "10.8.1"
resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.8.1.tgz#ea2bd3459011b52699d7e88daa55a45a1af4f066"
@@ -4757,6 +4780,11 @@
core-util-is "1.0.2"
extsprintf "^1.2.0"
+web-streams-polyfill@^3.0.3:
+ version "3.2.1"
+ resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz#71c2718c52b45fd49dbeee88634b3a60ceab42a6"
+ integrity sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==
+
web3-bzz@1.7.3:
version "1.7.3"
resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.7.3.tgz#6860a584f748838af5e3932b6798e024ab8ae951"
@@ -4984,11 +5012,6 @@
web3-net "1.7.3"
web3-shh "1.7.3"
web3-utils "1.7.3"
-
-webidl-conversions@^3.0.0:
- version "3.0.1"
- resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871"
- integrity sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=
websocket@^1.0.32, websocket@^1.0.34:
version "1.0.34"
@@ -5001,14 +5024,6 @@
typedarray-to-buffer "^3.1.5"
utf-8-validate "^5.0.2"
yaeti "^0.0.6"
-
-whatwg-url@^5.0.0:
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d"
- integrity sha1-lmRU6HZUYuN2RNNib2dCzotwll0=
- dependencies:
- tr46 "~0.0.3"
- webidl-conversions "^3.0.0"
which-boxed-primitive@^1.0.2:
version "1.0.2"