diff --git a/tests/package.json b/tests/package.json index a38c11f..e19019a 100644 --- a/tests/package.json +++ b/tests/package.json @@ -46,7 +46,8 @@ }, "dependencies": { "@polymeshassociation/local-signing-manager": "^3.5.2", - "@polymeshassociation/polymesh-sdk": "^27.5.1", + "@polymeshassociation/polymesh-sdk": "^28.0.0", + "@polymeshassociation/polymesh-types": "^6.2.0", "cross-fetch": "^4.1.0", "dotenv": "^16.5.0" }, diff --git a/tests/src/__tests__/rest/assets/controllerTransfer.ts b/tests/src/__tests__/rest/assets/controllerTransfer.ts index 603884a..2712365 100644 --- a/tests/src/__tests__/rest/assets/controllerTransfer.ts +++ b/tests/src/__tests__/rest/assets/controllerTransfer.ts @@ -5,112 +5,121 @@ import { ProcessMode } from '~/rest/common'; import { Identity } from '~/rest/identities/interfaces'; import { RestSuccessResult } from '~/rest/interfaces'; import { fungibleInstructionParams } from '~/rest/settlements/params'; + import { expectBasicTxInfo } from '../utils'; const handles = ['issuer', 'holder']; let factory: TestFactory; describe('Fungible AssetController transfer', () => { - let restClient: RestClient; - let signer: string; - let issuer: Identity; - let holder: Identity; - let assetParams: ReturnType; - let assetId: string; - - beforeAll(async () => { - factory = await TestFactory.create({ handles }); - ({ restClient } = factory); - issuer = factory.getSignerIdentity(handles[0]); - holder = factory.getSignerIdentity(handles[1]); - - signer = issuer.signer; - - assetParams = createAssetParams({ - options: { processMode: ProcessMode.Submit, signer }, - }); + let restClient: RestClient; + let signer: string; + let issuer: Identity; + let holder: Identity; + let assetParams: ReturnType; + let assetId: string; + + beforeAll(async () => { + factory = await TestFactory.create({ handles }); + ({ restClient } = factory); + issuer = factory.getSignerIdentity(handles[0]); + holder = factory.getSignerIdentity(handles[1]); + + signer = issuer.signer; + + assetParams = createAssetParams({ + options: { processMode: ProcessMode.Submit, signer }, }); + }); - afterAll(async () => { - await factory.close(); - }); + afterAll(async () => { + await factory.close(); + }); - it('should create and fetch the Asset', async () => { - assetId = await restClient.assets.createAndGetAssetId(assetParams); + it('should create and fetch the Asset', async () => { + assetId = await restClient.assets.createAndGetAssetId(assetParams); - const asset = await restClient.assets.getAsset(assetId); + const asset = await restClient.assets.getAsset(assetId); - expect(asset).toMatchObject({ - name: assetParams.name, - assetType: assetParams.assetType, - }); + expect(asset).toMatchObject({ + name: assetParams.name, + assetType: assetParams.assetType, }); - - it('should transfer the asset to holder', async () => { - const transferToHolderTx = await restClient.settlements.createDirectInstruction(fungibleInstructionParams(assetId, issuer.did, holder.did, { - options: { processMode: ProcessMode.Submit, signer }, - })); - - // should have created an instruction - expect((transferToHolderTx as RestSuccessResult).instruction).toBeDefined(); - - const txData = await restClient.settlements.affirmInstruction( - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (transferToHolderTx as any).instruction, - { - options: { processMode: ProcessMode.Submit, signer: holder.signer }, - } - ); - - expect(txData).toMatchObject({ - transactions: expect.arrayContaining([ - { - transactionTag: 'settlement.affirmInstructionWithCount', - type: 'single', - ...expectBasicTxInfo, - }, - ]), - }); - - const { results } = await restClient.assets.getAssetHolders(assetId); - - expect(results.length).toEqual(2); - expect(results).toContainEqual(expect.objectContaining({ - identity: issuer.did, - balance: '99990', - })); - expect(results).toContainEqual(expect.objectContaining({ - identity: holder.did, - balance: '10', - })); + }); + + it('should transfer the asset to holder', async () => { + const transferToHolderTx = await restClient.settlements.createDirectInstruction( + fungibleInstructionParams(assetId, issuer.did, holder.did, { + options: { processMode: ProcessMode.Submit, signer }, + }) + ); + + // should have created an instruction + expect((transferToHolderTx as RestSuccessResult).instruction).toBeDefined(); + + const txData = await restClient.settlements.affirmInstruction( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (transferToHolderTx as any).instruction, + { + options: { processMode: ProcessMode.Submit, signer: holder.signer }, + } + ); + + expect(txData).toMatchObject({ + transactions: expect.arrayContaining([ + { + transactionTag: 'settlement.affirmInstructionWithCount', + type: 'single', + ...expectBasicTxInfo, + }, + ]), }); - it('should run controller transfer and return the asset back to the issuer', async () => { - const controllerTransferTx = await restClient.assets.controllerTransfer(assetId, controllerTransferParams({ did: holder.did, id: '0' }, 10, { - options: { processMode: ProcessMode.Submit, signer }, - })) as RestSuccessResult; - - expect(controllerTransferTx).toMatchObject({ - transactions: expect.arrayContaining([ - { - transactionTag: 'asset.controllerTransfer', - type: 'single', - ...expectBasicTxInfo, - }, - ]), - }); - - - const { results } = await restClient.assets.getAssetHolders(assetId); - - expect(results.length).toEqual(1); - expect(results).toContainEqual(expect.objectContaining({ - identity: expect.objectContaining({ - did: issuer.did, - }), - balance: expect.objectContaining({ - amount: '100000', - }), - })); + const { results } = await restClient.assets.getAssetHolders(assetId); + + expect(results.length).toEqual(2); + expect(results).toContainEqual( + expect.objectContaining({ + identity: issuer.did, + balance: '99990', + }) + ); + expect(results).toContainEqual( + expect.objectContaining({ + identity: holder.did, + balance: '10', + }) + ); + }); + + it('should run controller transfer and return the asset back to the issuer', async () => { + const controllerTransferTx = (await restClient.assets.controllerTransfer( + assetId, + controllerTransferParams({ did: holder.did, id: '0' }, 10, { + options: { processMode: ProcessMode.Submit, signer }, + }) + )) as RestSuccessResult; + + expect(controllerTransferTx).toMatchObject({ + transactions: expect.arrayContaining([ + { + transactionTag: 'asset.controllerTransfer', + type: 'single', + ...expectBasicTxInfo, + }, + ]), }); + + const { results } = await restClient.assets.getAssetHolders(assetId); + + expect(results.length).toBeGreaterThan(1); + expect(results).toEqual( + expect.arrayContaining([ + { + identity: issuer.did, + balance: '100000', + }, + ]) + ); + }); }); diff --git a/tests/src/sdk/settlements/transferRestrictions.ts b/tests/src/sdk/settlements/transferRestrictions.ts index 13860cd..dad9337 100644 --- a/tests/src/sdk/settlements/transferRestrictions.ts +++ b/tests/src/sdk/settlements/transferRestrictions.ts @@ -1,5 +1,9 @@ import { BigNumber, Polymesh } from '@polymeshassociation/polymesh-sdk'; -import { FungibleAsset } from '@polymeshassociation/polymesh-sdk/types'; +import { + FungibleAsset, + StatType, + TransferRestrictionType, +} from '@polymeshassociation/polymesh-sdk/types'; import assert from 'node:assert'; import { wellKnown } from '~/consts'; @@ -23,39 +27,53 @@ export const transferRestrictions = async (sdk: Polymesh, asset: FungibleAsset): Transfer Restrictions require their respective stats to be enabled. Enabling a stat will slightly increase gas fees for all transfers. Statistics can also be enabled during creation by passing `initialStatistics` in the `sdk.assets.createAsset` call */ - const addPercentageStatTx = await asset.transferRestrictions.percentage.enableStat(); + const addPercentageStatTx = await asset.transferRestrictions.setStats({ + stats: [ + { + type: StatType.Balance, + }, + ], + }); await addPercentageStatTx.run(); assert(addPercentageStatTx.isSuccess); - const addPercentageRestrictionTx = await asset.transferRestrictions.percentage.addRestriction({ - percentage: new BigNumber(10), + const addPercentageRestrictionTx = await asset.transferRestrictions.setRestrictions({ + restrictions: [ + { + type: TransferRestrictionType.Percentage, + percentage: new BigNumber(10), + }, + ], }); await addPercentageRestrictionTx.run(); assert(addPercentageRestrictionTx.isSuccess); // Multiple restrictions can be set at once. This overrides existing "percentage" claims - const setPercentageRestrictionsTx = await asset.transferRestrictions.percentage.setRestrictions({ + const setPercentageRestrictionsTx = await asset.transferRestrictions.setRestrictions({ restrictions: [ { + type: TransferRestrictionType.Percentage, percentage: new BigNumber(10), // (optional) investors can be exempt from any restriction, specified by an Identity or DID string - exemptedIdentities: [identity], + // exemptedIdentities: [identity], }, ], }); await setPercentageRestrictionsTx.run(); assert(setPercentageRestrictionsTx.isSuccess); - const { restrictions } = await asset.transferRestrictions.percentage.get(); + const { restrictions } = await asset.transferRestrictions.getRestrictions(); assert(restrictions.length > 0, 'there should be a percentage restriction'); - // All restrictions of a certain type can be removed - const removeRestrictionsTx = await asset.transferRestrictions.percentage.removeRestrictions(); + // All restrictions can be removed + const removeRestrictionsTx = await asset.transferRestrictions.setRestrictions({ + restrictions: [], + }); await removeRestrictionsTx.run(); assert(removeRestrictionsTx.isSuccess); // Statistics should be disabled if no Transfer Restriction is using them - const disablePercentageStatTx = await asset.transferRestrictions.percentage.disableStat(); + const disablePercentageStatTx = await asset.transferRestrictions.setStats({ stats: [] }); await disablePercentageStatTx.run(); assert(disablePercentageStatTx.isSuccess); @@ -66,16 +84,26 @@ export const transferRestrictions = async (sdk: Polymesh, asset: FungibleAsset): IMPORTANT! there is a potential "time of check, time of use" bug. Trading should be paused during the count stat creation process */ const count = await asset.investorCount(); - const enableCountStatTx = await asset.transferRestrictions.count.enableStat({ - count, + const enableCountStatTx = await asset.transferRestrictions.setStats({ + stats: [ + { + type: StatType.Count, + count, + }, + ], }); await enableCountStatTx.run(); assert(enableCountStatTx.isSuccess); // Create a restriction to limit the Asset to have at most 10 holders - const addCountRestrictionTx = await asset.transferRestrictions.count.addRestriction({ - count: new BigNumber(10), - exemptedIdentities: [wellKnown.alice.did, identity], + const addCountRestrictionTx = await asset.transferRestrictions.setRestrictions({ + restrictions: [ + { + count: new BigNumber(10), + type: TransferRestrictionType.Count, + // exemptedIdentities: [wellKnown.alice.did, identity], + }, + ], }); await addCountRestrictionTx.run(); assert(addCountRestrictionTx.isSuccess); diff --git a/tests/yarn.lock b/tests/yarn.lock index 2b4818f..cd5971e 100644 --- a/tests/yarn.lock +++ b/tests/yarn.lock @@ -891,6 +891,20 @@ __metadata: languageName: node linkType: hard +"@polkadot-api/client@npm:0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0": + version: 0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0 + resolution: "@polkadot-api/client@npm:0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0" + dependencies: + "@polkadot-api/metadata-builders": "npm:0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0" + "@polkadot-api/substrate-bindings": "npm:0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0" + "@polkadot-api/substrate-client": "npm:0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0" + "@polkadot-api/utils": "npm:0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0" + peerDependencies: + rxjs: ">=7.8.0" + checksum: 10c0/f80744e1612446a09fdd3f5a98cdf8f9a5b9fdeddcfa083084b49e0ae63e4b4875a326487258bcbb60e6edc2fbb831436abe4a48b87942c4417ba1ee05e95648 + languageName: node + linkType: hard + "@polkadot-api/json-rpc-provider-proxy@npm:0.0.1": version: 0.0.1 resolution: "@polkadot-api/json-rpc-provider-proxy@npm:0.0.1" @@ -898,6 +912,13 @@ __metadata: languageName: node linkType: hard +"@polkadot-api/json-rpc-provider-proxy@npm:0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0": + version: 0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0 + resolution: "@polkadot-api/json-rpc-provider-proxy@npm:0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0" + checksum: 10c0/63160c2227996e1d8926a7d0281cd7a747e53e8049a63c74087425bca6a986662f46ca8e0be5b31882816199aeef1863c8ee9a7d2834d2ee1a0d1bc6dc7d61f3 + languageName: node + linkType: hard + "@polkadot-api/json-rpc-provider@npm:0.0.1": version: 0.0.1 resolution: "@polkadot-api/json-rpc-provider@npm:0.0.1" @@ -905,6 +926,13 @@ __metadata: languageName: node linkType: hard +"@polkadot-api/json-rpc-provider@npm:0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0": + version: 0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0 + resolution: "@polkadot-api/json-rpc-provider@npm:0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0" + checksum: 10c0/2cc039dfd0234696e624a48d94f07b68ab3b1fc402f703b142b05f640301c47a3c5315a6ef10d2a61c31d6f93181d1240ba5b4e169e5cb8a428f5eb9613b0123 + languageName: node + linkType: hard + "@polkadot-api/metadata-builders@npm:0.0.1": version: 0.0.1 resolution: "@polkadot-api/metadata-builders@npm:0.0.1" @@ -915,6 +943,16 @@ __metadata: languageName: node linkType: hard +"@polkadot-api/metadata-builders@npm:0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0": + version: 0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0 + resolution: "@polkadot-api/metadata-builders@npm:0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0" + dependencies: + "@polkadot-api/substrate-bindings": "npm:0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0" + "@polkadot-api/utils": "npm:0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0" + checksum: 10c0/15dcba05a0c7cafaab72edc6c6246133cc25f94a158f0ac2091e3c774271cae6cf64658cefe5db9d57eb16e9a9cc8936f387547064237d129d7675e9ca27e1d3 + languageName: node + linkType: hard + "@polkadot-api/observable-client@npm:0.1.0": version: 0.1.0 resolution: "@polkadot-api/observable-client@npm:0.1.0" @@ -941,6 +979,18 @@ __metadata: languageName: node linkType: hard +"@polkadot-api/substrate-bindings@npm:0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0": + version: 0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0 + resolution: "@polkadot-api/substrate-bindings@npm:0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0" + dependencies: + "@noble/hashes": "npm:^1.3.1" + "@polkadot-api/utils": "npm:0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0" + "@scure/base": "npm:^1.1.1" + scale-ts: "npm:^1.6.0" + checksum: 10c0/f6273cbb1ed74f253f83dfb9e4b46375eb7430e17e69a2f3d631ff80d8ff7b7e871cdf89639ef18635a659a60623e384c894ab2e1889d70442f7ca73c05b44e3 + languageName: node + linkType: hard + "@polkadot-api/substrate-client@npm:0.0.1": version: 0.0.1 resolution: "@polkadot-api/substrate-client@npm:0.0.1" @@ -948,6 +998,13 @@ __metadata: languageName: node linkType: hard +"@polkadot-api/substrate-client@npm:0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0": + version: 0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0 + resolution: "@polkadot-api/substrate-client@npm:0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0" + checksum: 10c0/56dc28993d06a14b4091f028956f8bb179d3c602a3e3979a978eb2192233ce6ad2f12d4a583e859480521d4c75629aab1d7f0effd989da0ebb90a1b51e7ee073 + languageName: node + linkType: hard + "@polkadot-api/utils@npm:0.0.1": version: 0.0.1 resolution: "@polkadot-api/utils@npm:0.0.1" @@ -955,6 +1012,28 @@ __metadata: languageName: node linkType: hard +"@polkadot-api/utils@npm:0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0": + version: 0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0 + resolution: "@polkadot-api/utils@npm:0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0" + checksum: 10c0/63c36ac45d63a4f8718d1324be0290dadfbfbb387e440d5962de13200861400a6af09a5e96b73f985fd4c27d03c93927420c8145e49e1e822653a3c223dda645 + languageName: node + linkType: hard + +"@polkadot/api-augment@npm:10.13.1": + version: 10.13.1 + resolution: "@polkadot/api-augment@npm:10.13.1" + dependencies: + "@polkadot/api-base": "npm:10.13.1" + "@polkadot/rpc-augment": "npm:10.13.1" + "@polkadot/types": "npm:10.13.1" + "@polkadot/types-augment": "npm:10.13.1" + "@polkadot/types-codec": "npm:10.13.1" + "@polkadot/util": "npm:^12.6.2" + tslib: "npm:^2.6.2" + checksum: 10c0/5f1faa67bc8a574fe97debc8aa7e7f6795aa437a1212121188d6bbeb1d465b47b0a1a22b8268f3136e1956dcdf0c1f9004b2a7968a275414e93b0a4e91ba7edc + languageName: node + linkType: hard + "@polkadot/api-augment@npm:11.2.1": version: 11.2.1 resolution: "@polkadot/api-augment@npm:11.2.1" @@ -970,6 +1049,19 @@ __metadata: languageName: node linkType: hard +"@polkadot/api-base@npm:10.13.1": + version: 10.13.1 + resolution: "@polkadot/api-base@npm:10.13.1" + dependencies: + "@polkadot/rpc-core": "npm:10.13.1" + "@polkadot/types": "npm:10.13.1" + "@polkadot/util": "npm:^12.6.2" + rxjs: "npm:^7.8.1" + tslib: "npm:^2.6.2" + checksum: 10c0/3adaa5d3c34e16cc28a0427839c87aab7b1d022c8b6992c43dc91ab7e910d0c8e17dca9ee6b7c9e27a6486aa8878dd7deae79870d7d44ede92aba8421241c249 + languageName: node + linkType: hard + "@polkadot/api-base@npm:11.2.1": version: 11.2.1 resolution: "@polkadot/api-base@npm:11.2.1" @@ -983,6 +1075,24 @@ __metadata: languageName: node linkType: hard +"@polkadot/api-derive@npm:10.13.1": + version: 10.13.1 + resolution: "@polkadot/api-derive@npm:10.13.1" + dependencies: + "@polkadot/api": "npm:10.13.1" + "@polkadot/api-augment": "npm:10.13.1" + "@polkadot/api-base": "npm:10.13.1" + "@polkadot/rpc-core": "npm:10.13.1" + "@polkadot/types": "npm:10.13.1" + "@polkadot/types-codec": "npm:10.13.1" + "@polkadot/util": "npm:^12.6.2" + "@polkadot/util-crypto": "npm:^12.6.2" + rxjs: "npm:^7.8.1" + tslib: "npm:^2.6.2" + checksum: 10c0/91df2f399b0133bdcc19edb595e058481b1ffc63e80dbbc58c928eb04982cae1372fe7e3eda6b05888c88b68ae152f46646d080f4b940a5cca9307a681b7c78f + languageName: node + linkType: hard + "@polkadot/api-derive@npm:11.2.1": version: 11.2.1 resolution: "@polkadot/api-derive@npm:11.2.1" @@ -1001,6 +1111,31 @@ __metadata: languageName: node linkType: hard +"@polkadot/api@npm:10.13.1, @polkadot/api@npm:^10.13.1": + version: 10.13.1 + resolution: "@polkadot/api@npm:10.13.1" + dependencies: + "@polkadot/api-augment": "npm:10.13.1" + "@polkadot/api-base": "npm:10.13.1" + "@polkadot/api-derive": "npm:10.13.1" + "@polkadot/keyring": "npm:^12.6.2" + "@polkadot/rpc-augment": "npm:10.13.1" + "@polkadot/rpc-core": "npm:10.13.1" + "@polkadot/rpc-provider": "npm:10.13.1" + "@polkadot/types": "npm:10.13.1" + "@polkadot/types-augment": "npm:10.13.1" + "@polkadot/types-codec": "npm:10.13.1" + "@polkadot/types-create": "npm:10.13.1" + "@polkadot/types-known": "npm:10.13.1" + "@polkadot/util": "npm:^12.6.2" + "@polkadot/util-crypto": "npm:^12.6.2" + eventemitter3: "npm:^5.0.1" + rxjs: "npm:^7.8.1" + tslib: "npm:^2.6.2" + checksum: 10c0/c2192c51aca790b2d8915a08e55e3b0461c49a1ce3ceccc5597cd74d68367ff0a881a0a864a0897835364482618d0a945247576573ef7c00688f1a25a5347ccc + languageName: node + linkType: hard + "@polkadot/api@npm:11.2.1": version: 11.2.1 resolution: "@polkadot/api@npm:11.2.1" @@ -1051,6 +1186,19 @@ __metadata: languageName: node linkType: hard +"@polkadot/rpc-augment@npm:10.13.1": + version: 10.13.1 + resolution: "@polkadot/rpc-augment@npm:10.13.1" + dependencies: + "@polkadot/rpc-core": "npm:10.13.1" + "@polkadot/types": "npm:10.13.1" + "@polkadot/types-codec": "npm:10.13.1" + "@polkadot/util": "npm:^12.6.2" + tslib: "npm:^2.6.2" + checksum: 10c0/5389ac83712cb0144e5f6b4319f76a54e8c85d455043ba688d32b233bc83202479f5506a8c8a0a7b0e8688150ca4c8d63ef57b2255e52827a5738eb600ab01ee + languageName: node + linkType: hard + "@polkadot/rpc-augment@npm:11.2.1": version: 11.2.1 resolution: "@polkadot/rpc-augment@npm:11.2.1" @@ -1064,6 +1212,20 @@ __metadata: languageName: node linkType: hard +"@polkadot/rpc-core@npm:10.13.1": + version: 10.13.1 + resolution: "@polkadot/rpc-core@npm:10.13.1" + dependencies: + "@polkadot/rpc-augment": "npm:10.13.1" + "@polkadot/rpc-provider": "npm:10.13.1" + "@polkadot/types": "npm:10.13.1" + "@polkadot/util": "npm:^12.6.2" + rxjs: "npm:^7.8.1" + tslib: "npm:^2.6.2" + checksum: 10c0/423479b6332eae4729076e1faa7371e7516021348ec6b4a4323a25740ea2577afdb395e767580babd854da14f63065cd4ac766a58b61263d09db64f1f6bb2599 + languageName: node + linkType: hard + "@polkadot/rpc-core@npm:11.2.1": version: 11.2.1 resolution: "@polkadot/rpc-core@npm:11.2.1" @@ -1078,6 +1240,30 @@ __metadata: languageName: node linkType: hard +"@polkadot/rpc-provider@npm:10.13.1": + version: 10.13.1 + resolution: "@polkadot/rpc-provider@npm:10.13.1" + dependencies: + "@polkadot/keyring": "npm:^12.6.2" + "@polkadot/types": "npm:10.13.1" + "@polkadot/types-support": "npm:10.13.1" + "@polkadot/util": "npm:^12.6.2" + "@polkadot/util-crypto": "npm:^12.6.2" + "@polkadot/x-fetch": "npm:^12.6.2" + "@polkadot/x-global": "npm:^12.6.2" + "@polkadot/x-ws": "npm:^12.6.2" + "@substrate/connect": "npm:0.8.8" + eventemitter3: "npm:^5.0.1" + mock-socket: "npm:^9.3.1" + nock: "npm:^13.5.0" + tslib: "npm:^2.6.2" + dependenciesMeta: + "@substrate/connect": + optional: true + checksum: 10c0/13bc88d973a55b131bea9429831caa19b85cde73bb0c8d124bbeb1f9b5cd63d4e297a38be477e75b8930e181ab837249fec06417dc52cc5c438149313e5a2947 + languageName: node + linkType: hard + "@polkadot/rpc-provider@npm:11.2.1": version: 11.2.1 resolution: "@polkadot/rpc-provider@npm:11.2.1" @@ -1102,6 +1288,18 @@ __metadata: languageName: node linkType: hard +"@polkadot/types-augment@npm:10.13.1": + version: 10.13.1 + resolution: "@polkadot/types-augment@npm:10.13.1" + dependencies: + "@polkadot/types": "npm:10.13.1" + "@polkadot/types-codec": "npm:10.13.1" + "@polkadot/util": "npm:^12.6.2" + tslib: "npm:^2.6.2" + checksum: 10c0/0686a834fd5d4db1cc74c184057cf1c47f008d3d541866cb2f2a38464c6a41cb159e5ec914b2e3d68511f6c6c7798238b58ec3bd1315a67fbb1ee073147457c6 + languageName: node + linkType: hard + "@polkadot/types-augment@npm:11.2.1": version: 11.2.1 resolution: "@polkadot/types-augment@npm:11.2.1" @@ -1114,6 +1312,17 @@ __metadata: languageName: node linkType: hard +"@polkadot/types-codec@npm:10.13.1": + version: 10.13.1 + resolution: "@polkadot/types-codec@npm:10.13.1" + dependencies: + "@polkadot/util": "npm:^12.6.2" + "@polkadot/x-bigint": "npm:^12.6.2" + tslib: "npm:^2.6.2" + checksum: 10c0/8a35c492006502804a5531231c14037ab98a13f345f4e550142254e69d62d451f0caa89347ac689b92f90b582fe6ab2f1c8eca30cdf327951323b6400fca2e50 + languageName: node + linkType: hard + "@polkadot/types-codec@npm:11.2.1": version: 11.2.1 resolution: "@polkadot/types-codec@npm:11.2.1" @@ -1125,6 +1334,17 @@ __metadata: languageName: node linkType: hard +"@polkadot/types-create@npm:10.13.1": + version: 10.13.1 + resolution: "@polkadot/types-create@npm:10.13.1" + dependencies: + "@polkadot/types-codec": "npm:10.13.1" + "@polkadot/util": "npm:^12.6.2" + tslib: "npm:^2.6.2" + checksum: 10c0/efe57d84f6088111b53d29db07ab9bf951f79c3e9b4875882c7a9bb0a6f1e00230e63a84cf2a850528119bbfa7f30bdfb21bba645e3922d88ff83092ea0350c5 + languageName: node + linkType: hard + "@polkadot/types-create@npm:11.2.1": version: 11.2.1 resolution: "@polkadot/types-create@npm:11.2.1" @@ -1136,6 +1356,20 @@ __metadata: languageName: node linkType: hard +"@polkadot/types-known@npm:10.13.1": + version: 10.13.1 + resolution: "@polkadot/types-known@npm:10.13.1" + dependencies: + "@polkadot/networks": "npm:^12.6.2" + "@polkadot/types": "npm:10.13.1" + "@polkadot/types-codec": "npm:10.13.1" + "@polkadot/types-create": "npm:10.13.1" + "@polkadot/util": "npm:^12.6.2" + tslib: "npm:^2.6.2" + checksum: 10c0/ce4e5b402e4d923a1b93475997e57bb6b7f95cc679a466c7d563d9d033872479100cf5ac72c58faaf57610602c913555ef0b4bd4672c6c76fc733c062d41959b + languageName: node + linkType: hard + "@polkadot/types-known@npm:11.2.1": version: 11.2.1 resolution: "@polkadot/types-known@npm:11.2.1" @@ -1150,6 +1384,16 @@ __metadata: languageName: node linkType: hard +"@polkadot/types-support@npm:10.13.1": + version: 10.13.1 + resolution: "@polkadot/types-support@npm:10.13.1" + dependencies: + "@polkadot/util": "npm:^12.6.2" + tslib: "npm:^2.6.2" + checksum: 10c0/a9bf65b139b1c861acc198ce650e14d2014f88d30f890710baf3481caa16b44dc39122b05d34cc86211b08e082cf4e7d5680ba3a4008711fe86b70d62a65219c + languageName: node + linkType: hard + "@polkadot/types-support@npm:11.2.1": version: 11.2.1 resolution: "@polkadot/types-support@npm:11.2.1" @@ -1160,6 +1404,22 @@ __metadata: languageName: node linkType: hard +"@polkadot/types@npm:10.13.1, @polkadot/types@npm:^10.13.1": + version: 10.13.1 + resolution: "@polkadot/types@npm:10.13.1" + dependencies: + "@polkadot/keyring": "npm:^12.6.2" + "@polkadot/types-augment": "npm:10.13.1" + "@polkadot/types-codec": "npm:10.13.1" + "@polkadot/types-create": "npm:10.13.1" + "@polkadot/util": "npm:^12.6.2" + "@polkadot/util-crypto": "npm:^12.6.2" + rxjs: "npm:^7.8.1" + tslib: "npm:^2.6.2" + checksum: 10c0/1fe50d7ba10368dd944fec0e2da740f8c665c1c417362ab5ed1587d9083259c65064e04a862443d1a6c9f1da86b8dee6a4945e711064f0318895a38ad1303e3b + languageName: node + linkType: hard + "@polkadot/types@npm:11.2.1": version: 11.2.1 resolution: "@polkadot/types@npm:11.2.1" @@ -1377,9 +1637,9 @@ __metadata: languageName: node linkType: hard -"@polymeshassociation/polymesh-sdk@npm:^27.5.1": - version: 27.7.0 - resolution: "@polymeshassociation/polymesh-sdk@npm:27.7.0" +"@polymeshassociation/polymesh-sdk@npm:^28.0.0": + version: 28.0.0 + resolution: "@polymeshassociation/polymesh-sdk@npm:28.0.0" dependencies: "@apollo/client": "npm:^3.8.1" "@polkadot/api": "npm:11.2.1" @@ -1397,7 +1657,17 @@ __metadata: semver: "npm:^7.5.4" ts-morph: "npm:^25.0.1" websocket: "npm:^1.0.34" - checksum: 10c0/7d932a3dd4b510869fda88b12d510cd32cbb6986d066e9846361565dc89d1848f0b71a1374eeb7229c1e92a4565e24c70052a2115b9915a50e43669b3ceaef3d + checksum: 10c0/71e36966ae20cf62bb9c5ff96f7e56f93a22e37d028334df0ef5e8b22a8f3f1768938e5ad447421dd6c221b2f043cba2d20527a06fcb204d122cfc4fe000f72c + languageName: node + linkType: hard + +"@polymeshassociation/polymesh-types@npm:^6.2.0": + version: 6.2.0 + resolution: "@polymeshassociation/polymesh-types@npm:6.2.0" + dependencies: + "@polkadot/api": "npm:^10.13.1" + "@polkadot/types": "npm:^10.13.1" + checksum: 10c0/a5a217891cb4cc64b52652ba7e38c60171d83fa9eb3fb527d8e9c754faf7536f06c71996a25c6204b1f6852e083ca65edb20b8c2990096a44f5ef2354e6cbe2b languageName: node linkType: hard @@ -1449,6 +1719,13 @@ __metadata: languageName: node linkType: hard +"@substrate/connect-known-chains@npm:^1.1.1": + version: 1.10.3 + resolution: "@substrate/connect-known-chains@npm:1.10.3" + checksum: 10c0/ae4a73f1ba2c85a4846e12d4032db9917135825b0112f3bf7c4c4ebb94a062ac1e089174e67119e135178755d1485e8461cdf1ace2ebebba1fe132ef4f533ee1 + languageName: node + linkType: hard + "@substrate/connect-known-chains@npm:^1.1.4": version: 1.10.2 resolution: "@substrate/connect-known-chains@npm:1.10.2" @@ -1468,6 +1745,35 @@ __metadata: languageName: node linkType: hard +"@substrate/connect@npm:0.8.8": + version: 0.8.8 + resolution: "@substrate/connect@npm:0.8.8" + dependencies: + "@substrate/connect-extension-protocol": "npm:^2.0.0" + "@substrate/connect-known-chains": "npm:^1.1.1" + "@substrate/light-client-extension-helpers": "npm:^0.0.4" + smoldot: "npm:2.0.22" + checksum: 10c0/d2507a5c2392523c31b1e25a4b0955b7c271406d527511c5ceab561fff0d8788262d638ff996dc2978464998f5db78cf373b34d2af86b040686c86f36093ec65 + languageName: node + linkType: hard + +"@substrate/light-client-extension-helpers@npm:^0.0.4": + version: 0.0.4 + resolution: "@substrate/light-client-extension-helpers@npm:0.0.4" + dependencies: + "@polkadot-api/client": "npm:0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0" + "@polkadot-api/json-rpc-provider": "npm:0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0" + "@polkadot-api/json-rpc-provider-proxy": "npm:0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0" + "@polkadot-api/substrate-client": "npm:0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0" + "@substrate/connect-extension-protocol": "npm:^2.0.0" + "@substrate/connect-known-chains": "npm:^1.1.1" + rxjs: "npm:^7.8.1" + peerDependencies: + smoldot: 2.x + checksum: 10c0/51e44ab2f3efaf8482047d3ed89e51327b54f53bd9d4169ce3738daf22e0afa849560cfd1f487ae809ea9adfdb93812f1cb74329d44cf686c0b552493b47b122 + languageName: node + linkType: hard + "@substrate/light-client-extension-helpers@npm:^0.0.6": version: 0.0.6 resolution: "@substrate/light-client-extension-helpers@npm:0.0.6" @@ -6501,7 +6807,8 @@ __metadata: resolution: "polymesh-dev-env@workspace:." dependencies: "@polymeshassociation/local-signing-manager": "npm:^3.5.2" - "@polymeshassociation/polymesh-sdk": "npm:^27.5.1" + "@polymeshassociation/polymesh-sdk": "npm:^28.0.0" + "@polymeshassociation/polymesh-types": "npm:^6.2.0" "@types/jest": "npm:^29.5.14" "@types/node": "npm:^22.15.17" "@typescript-eslint/eslint-plugin": "npm:4.29.0"