diff --git a/packages/apps-config/package.json b/packages/apps-config/package.json index fe2de3b972..ff4f85ce5a 100644 --- a/packages/apps-config/package.json +++ b/packages/apps-config/package.json @@ -33,6 +33,7 @@ "@logion/node-api": "0.16.0-1", "@metaverse-network-sdk/type-definitions": "0.0.1-16", "@parallel-finance/type-definitions": "1.7.17", + "@peaqnetwork/type-definitions": "0.0.4", "@phala/typedefs": "0.2.33", "@polkadot/api": "^10.8.1", "@polkadot/api-derive": "^10.8.1", diff --git a/packages/apps-config/src/api/spec/index.ts b/packages/apps-config/src/api/spec/index.ts index 1c786baab6..e5eb2ed290 100644 --- a/packages/apps-config/src/api/spec/index.ts +++ b/packages/apps-config/src/api/spec/index.ts @@ -90,6 +90,7 @@ import pangolin from './pangolin.js'; import pangoro from './pangoro.js'; import parallel from './parallel.js'; import parami from './parami.js'; +import peaq from './peaq.js'; import phoenix from './phoenix.js'; import pichiu from './pichiu.js'; import polkadex from './polkadex.js'; @@ -250,6 +251,9 @@ const spec: Record = { 'origintrail-parachain': origintrail, parallel, parami, + 'peaq-node': peaq, + 'peaq-node-dev': peaq, + 'peaq-node-krest': peaq, 'phoenix-node': phoenix, 'phoenix-parachain': phoenix, pichiu, diff --git a/packages/apps-config/src/api/spec/peaq.ts b/packages/apps-config/src/api/spec/peaq.ts new file mode 100644 index 0000000000..5baa016584 --- /dev/null +++ b/packages/apps-config/src/api/spec/peaq.ts @@ -0,0 +1,8 @@ +// Copyright 2017-2023 @polkadot/apps-config authors & contributors +// SPDX-License-Identifier: Apache-2.0 + +import type { OverrideBundleDefinition } from '@polkadot/types/types'; + +import { typesBundleForPolkadot } from '@peaqnetwork/type-definitions'; + +export default (typesBundleForPolkadot as { spec: { peaq: OverrideBundleDefinition } }).spec.peaq; diff --git a/packages/apps-config/src/api/typesBundle.ts b/packages/apps-config/src/api/typesBundle.ts index 0a4a8a6855..298e863347 100644 --- a/packages/apps-config/src/api/typesBundle.ts +++ b/packages/apps-config/src/api/typesBundle.ts @@ -70357,6 +70357,603 @@ export const typesBundle = { } ] }, + "peaq-node": { + "rpc": { + "oracle": { + "getValue": { + "description": "Retrieves the oracle value for a given key.", + "params": [ + { + "name": "providerId", + "type": "RpcDataProviderId" + }, + { + "name": "key", + "type": "OracleKey" + }, + { + "name": "at", + "type": "BlockHash", + "isHistoric": true, + "isOptional": true + } + ], + "type": "Option", + "isSubscription": false, + "jsonrpc": "oracle_getValue", + "method": "getValue", + "section": "oracle" + }, + "getAllValues": { + "description": "Retrieves all oracle values.", + "params": [ + { + "name": "providerId", + "type": "RpcDataProviderId" + }, + { + "name": "at", + "type": "BlockHash", + "isHistoric": true, + "isOptional": true + } + ], + "type": "Vec<(OracleKey, Option)>", + "isSubscription": false, + "jsonrpc": "oracle_getAllValues", + "method": "getAllValues", + "section": "oracle" + } + }, + "peaqdid": { + "readAttribute": { + "description": "Read attribute", + "params": [ + { + "name": "didAccount", + "type": "AccountId" + }, + { + "name": "name", + "type": "Bytes" + }, + { + "name": "at", + "type": "BlockHash", + "isHistoric": true, + "isOptional": true + } + ], + "type": "Option", + "isSubscription": false, + "jsonrpc": "peaqdid_readAttribute", + "method": "readAttribute", + "section": "peaqdid" + } + }, + "peaqstorage": { + "readAttribute": { + "description": "Read attribute", + "params": [ + { + "name": "didAccount", + "type": "AccountId" + }, + { + "name": "itemType", + "type": "Bytes" + }, + { + "name": "at", + "type": "BlockHash", + "isHistoric": true, + "isOptional": true + } + ], + "type": "Option", + "isSubscription": false, + "jsonrpc": "peaqstorage_readAttribute", + "method": "readAttribute", + "section": "peaqstorage" + } + } + }, + "types": [ + { + "minmax": [ + 0, + null + ], + "types": { + "CallOf": "Call", + "DispatchTime": { + "_enum": { + "At": "BlockNumber", + "After": "BlockNumber" + } + }, + "ScheduleTaskIndex": "u32", + "DelayedOrigin": { + "delay": "BlockNumber", + "origin": "PalletsOrigin" + }, + "AuthorityOrigin": "DelayedOrigin", + "StorageValue": "Vec", + "GraduallyUpdate": { + "key": "StorageKey", + "targetValue": "StorageValue", + "perBlock": "StorageValue" + }, + "StorageKeyBytes": "Vec", + "StorageValueBytes": "Vec", + "RpcDataProviderId": "Text", + "DataProviderId": "u8", + "TimestampedValue": { + "value": "OracleValue", + "timestamp": "Moment" + }, + "TimestampedValueOf": "TimestampedValue", + "OrderedSet": "Vec", + "OrmlAccountData": { + "free": "Balance", + "frozen": "Balance", + "reserved": "Balance" + }, + "OrmlBalanceLock": { + "amount": "Balance", + "id": "LockIdentifier" + }, + "AuctionInfo": { + "bid": "Option<(AccountId, Balance)>", + "start": "BlockNumber", + "end": "Option" + }, + "DelayedDispatchTime": { + "_enum": { + "At": "BlockNumber", + "After": "BlockNumber" + } + }, + "DispatchId": "u32", + "Price": "FixedU128", + "OrmlVestingSchedule": { + "start": "BlockNumber", + "period": "BlockNumber", + "periodCount": "u32", + "perPeriod": "Compact" + }, + "VestingScheduleOf": "OrmlVestingSchedule", + "OrmlCurrencyId": "u8", + "PoolInfo": { + "totalShares": "Share", + "rewards": "BTreeMap" + }, + "CompactBalance": "Compact", + "PoolInfoV0": { + "totalShares": "Compact", + "totalRewards": "CompactBalance", + "totalWithdrawnRewards": "CompactBalance" + }, + "Share": "u128", + "OracleValue": "FixedU128", + "RPCAttribute": { + "name": "Bytes", + "value": "Bytes", + "validity": "Bytes", + "created": "Moment" + }, + "StorageRpcResult": { + "item": "Bytes" + }, + "Keys": "SessionKeys1" + } + } + ], + "alias": { + "tokens": { + "AccountData": "OrmlAccountData", + "BalanceLock": "OrmlBalanceLock" + } + } + }, + "peaq-node-dev": { + "rpc": { + "oracle": { + "getValue": { + "description": "Retrieves the oracle value for a given key.", + "params": [ + { + "name": "providerId", + "type": "RpcDataProviderId" + }, + { + "name": "key", + "type": "OracleKey" + }, + { + "name": "at", + "type": "BlockHash", + "isHistoric": true, + "isOptional": true + } + ], + "type": "Option", + "isSubscription": false, + "jsonrpc": "oracle_getValue", + "method": "getValue", + "section": "oracle" + }, + "getAllValues": { + "description": "Retrieves all oracle values.", + "params": [ + { + "name": "providerId", + "type": "RpcDataProviderId" + }, + { + "name": "at", + "type": "BlockHash", + "isHistoric": true, + "isOptional": true + } + ], + "type": "Vec<(OracleKey, Option)>", + "isSubscription": false, + "jsonrpc": "oracle_getAllValues", + "method": "getAllValues", + "section": "oracle" + } + }, + "peaqdid": { + "readAttribute": { + "description": "Read attribute", + "params": [ + { + "name": "didAccount", + "type": "AccountId" + }, + { + "name": "name", + "type": "Bytes" + }, + { + "name": "at", + "type": "BlockHash", + "isHistoric": true, + "isOptional": true + } + ], + "type": "Option", + "isSubscription": false, + "jsonrpc": "peaqdid_readAttribute", + "method": "readAttribute", + "section": "peaqdid" + } + }, + "peaqstorage": { + "readAttribute": { + "description": "Read attribute", + "params": [ + { + "name": "didAccount", + "type": "AccountId" + }, + { + "name": "itemType", + "type": "Bytes" + }, + { + "name": "at", + "type": "BlockHash", + "isHistoric": true, + "isOptional": true + } + ], + "type": "Option", + "isSubscription": false, + "jsonrpc": "peaqstorage_readAttribute", + "method": "readAttribute", + "section": "peaqstorage" + } + } + }, + "types": [ + { + "minmax": [ + 0, + null + ], + "types": { + "CallOf": "Call", + "DispatchTime": { + "_enum": { + "At": "BlockNumber", + "After": "BlockNumber" + } + }, + "ScheduleTaskIndex": "u32", + "DelayedOrigin": { + "delay": "BlockNumber", + "origin": "PalletsOrigin" + }, + "AuthorityOrigin": "DelayedOrigin", + "StorageValue": "Vec", + "GraduallyUpdate": { + "key": "StorageKey", + "targetValue": "StorageValue", + "perBlock": "StorageValue" + }, + "StorageKeyBytes": "Vec", + "StorageValueBytes": "Vec", + "RpcDataProviderId": "Text", + "DataProviderId": "u8", + "TimestampedValue": { + "value": "OracleValue", + "timestamp": "Moment" + }, + "TimestampedValueOf": "TimestampedValue", + "OrderedSet": "Vec", + "OrmlAccountData": { + "free": "Balance", + "frozen": "Balance", + "reserved": "Balance" + }, + "OrmlBalanceLock": { + "amount": "Balance", + "id": "LockIdentifier" + }, + "AuctionInfo": { + "bid": "Option<(AccountId, Balance)>", + "start": "BlockNumber", + "end": "Option" + }, + "DelayedDispatchTime": { + "_enum": { + "At": "BlockNumber", + "After": "BlockNumber" + } + }, + "DispatchId": "u32", + "Price": "FixedU128", + "OrmlVestingSchedule": { + "start": "BlockNumber", + "period": "BlockNumber", + "periodCount": "u32", + "perPeriod": "Compact" + }, + "VestingScheduleOf": "OrmlVestingSchedule", + "OrmlCurrencyId": "u8", + "PoolInfo": { + "totalShares": "Share", + "rewards": "BTreeMap" + }, + "CompactBalance": "Compact", + "PoolInfoV0": { + "totalShares": "Compact", + "totalRewards": "CompactBalance", + "totalWithdrawnRewards": "CompactBalance" + }, + "Share": "u128", + "OracleValue": "FixedU128", + "RPCAttribute": { + "name": "Bytes", + "value": "Bytes", + "validity": "Bytes", + "created": "Moment" + }, + "StorageRpcResult": { + "item": "Bytes" + }, + "Keys": "SessionKeys1" + } + } + ], + "alias": { + "tokens": { + "AccountData": "OrmlAccountData", + "BalanceLock": "OrmlBalanceLock" + } + } + }, + "peaq-node-krest": { + "rpc": { + "oracle": { + "getValue": { + "description": "Retrieves the oracle value for a given key.", + "params": [ + { + "name": "providerId", + "type": "RpcDataProviderId" + }, + { + "name": "key", + "type": "OracleKey" + }, + { + "name": "at", + "type": "BlockHash", + "isHistoric": true, + "isOptional": true + } + ], + "type": "Option", + "isSubscription": false, + "jsonrpc": "oracle_getValue", + "method": "getValue", + "section": "oracle" + }, + "getAllValues": { + "description": "Retrieves all oracle values.", + "params": [ + { + "name": "providerId", + "type": "RpcDataProviderId" + }, + { + "name": "at", + "type": "BlockHash", + "isHistoric": true, + "isOptional": true + } + ], + "type": "Vec<(OracleKey, Option)>", + "isSubscription": false, + "jsonrpc": "oracle_getAllValues", + "method": "getAllValues", + "section": "oracle" + } + }, + "peaqdid": { + "readAttribute": { + "description": "Read attribute", + "params": [ + { + "name": "didAccount", + "type": "AccountId" + }, + { + "name": "name", + "type": "Bytes" + }, + { + "name": "at", + "type": "BlockHash", + "isHistoric": true, + "isOptional": true + } + ], + "type": "Option", + "isSubscription": false, + "jsonrpc": "peaqdid_readAttribute", + "method": "readAttribute", + "section": "peaqdid" + } + }, + "peaqstorage": { + "readAttribute": { + "description": "Read attribute", + "params": [ + { + "name": "didAccount", + "type": "AccountId" + }, + { + "name": "itemType", + "type": "Bytes" + }, + { + "name": "at", + "type": "BlockHash", + "isHistoric": true, + "isOptional": true + } + ], + "type": "Option", + "isSubscription": false, + "jsonrpc": "peaqstorage_readAttribute", + "method": "readAttribute", + "section": "peaqstorage" + } + } + }, + "types": [ + { + "minmax": [ + 0, + null + ], + "types": { + "CallOf": "Call", + "DispatchTime": { + "_enum": { + "At": "BlockNumber", + "After": "BlockNumber" + } + }, + "ScheduleTaskIndex": "u32", + "DelayedOrigin": { + "delay": "BlockNumber", + "origin": "PalletsOrigin" + }, + "AuthorityOrigin": "DelayedOrigin", + "StorageValue": "Vec", + "GraduallyUpdate": { + "key": "StorageKey", + "targetValue": "StorageValue", + "perBlock": "StorageValue" + }, + "StorageKeyBytes": "Vec", + "StorageValueBytes": "Vec", + "RpcDataProviderId": "Text", + "DataProviderId": "u8", + "TimestampedValue": { + "value": "OracleValue", + "timestamp": "Moment" + }, + "TimestampedValueOf": "TimestampedValue", + "OrderedSet": "Vec", + "OrmlAccountData": { + "free": "Balance", + "frozen": "Balance", + "reserved": "Balance" + }, + "OrmlBalanceLock": { + "amount": "Balance", + "id": "LockIdentifier" + }, + "AuctionInfo": { + "bid": "Option<(AccountId, Balance)>", + "start": "BlockNumber", + "end": "Option" + }, + "DelayedDispatchTime": { + "_enum": { + "At": "BlockNumber", + "After": "BlockNumber" + } + }, + "DispatchId": "u32", + "Price": "FixedU128", + "OrmlVestingSchedule": { + "start": "BlockNumber", + "period": "BlockNumber", + "periodCount": "u32", + "perPeriod": "Compact" + }, + "VestingScheduleOf": "OrmlVestingSchedule", + "OrmlCurrencyId": "u8", + "PoolInfo": { + "totalShares": "Share", + "rewards": "BTreeMap" + }, + "CompactBalance": "Compact", + "PoolInfoV0": { + "totalShares": "Compact", + "totalRewards": "CompactBalance", + "totalWithdrawnRewards": "CompactBalance" + }, + "Share": "u128", + "OracleValue": "FixedU128", + "RPCAttribute": { + "name": "Bytes", + "value": "Bytes", + "validity": "Bytes", + "created": "Moment" + }, + "StorageRpcResult": { + "item": "Bytes" + }, + "Keys": "SessionKeys1" + } + } + ], + "alias": { + "tokens": { + "AccountData": "OrmlAccountData", + "BalanceLock": "OrmlBalanceLock" + } + } + }, "phoenix-node": { "types": [ { diff --git a/yarn.lock b/yarn.lock index 783b431ffb..aa6c279e9b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1196,7 +1196,7 @@ __metadata: languageName: node linkType: hard -"@open-web3/orml-type-definitions@npm:^0.9.4-7": +"@open-web3/orml-type-definitions@npm:^0.9.4-38, @open-web3/orml-type-definitions@npm:^0.9.4-7": version: 0.9.4-38 resolution: "@open-web3/orml-type-definitions@npm:0.9.4-38" dependencies: @@ -1223,6 +1223,15 @@ __metadata: languageName: node linkType: hard +"@peaqnetwork/type-definitions@npm:0.0.4": + version: 0.0.4 + resolution: "@peaqnetwork/type-definitions@npm:0.0.4" + dependencies: + "@open-web3/orml-type-definitions": ^0.9.4-38 + checksum: 6c38272a2170c8bfb91bb05bd8b46195c1dc9cd5ea85fc17531dd0d567eb889e2605080286a6c0bcd449217c999bc6d393bbc42db6347609aab23ec80cabcc1f + languageName: node + linkType: hard + "@phala/typedefs@npm:0.2.33": version: 0.2.33 resolution: "@phala/typedefs@npm:0.2.33" @@ -1846,6 +1855,7 @@ __metadata: "@logion/node-api": 0.16.0-1 "@metaverse-network-sdk/type-definitions": 0.0.1-16 "@parallel-finance/type-definitions": 1.7.17 + "@peaqnetwork/type-definitions": 0.0.4 "@phala/typedefs": 0.2.33 "@polkadot/api": ^10.8.1 "@polkadot/api-derive": ^10.8.1