瀏覽代碼

types: Add storage ContentId types.

Shamil Gadelshin 3 年之前
父節點
當前提交
bed3e7420a

File diff suppressed because it is too large
+ 1 - 1
types/augment-codec/all.ts


File diff suppressed because it is too large
+ 0 - 0
types/augment-codec/augment-types.ts


+ 2 - 1
types/augment/all/defs.json

@@ -1032,5 +1032,6 @@
         "deletionPrizeSourceAccountId": "GenericAccountId"
     },
     "StorageBucketIdSet": "BTreeSet<StorageBucketId>",
-    "DataObjectIdSet": "BTreeSet<DataObjectId>"
+    "DataObjectIdSet": "BTreeSet<DataObjectId>",
+    "ContentIdSet": "BTreeSet<Text>"
 }

+ 3 - 0
types/augment/all/types.ts

@@ -288,6 +288,9 @@ export interface ClassPropertyValue extends Null {}
 /** @name ContentId */
 export interface ContentId extends U8aFixed {}
 
+/** @name ContentIdSet */
+export interface ContentIdSet extends BTreeSet<Text> {}
+
 /** @name CreateEntityOperation */
 export interface CreateEntityOperation extends Struct {
   readonly class_id: ClassId;

File diff suppressed because it is too large
+ 0 - 0
types/augment/augment-types.ts


+ 6 - 1
types/src/storage.ts

@@ -1,4 +1,4 @@
-import { Null, u64, Text, Vec, GenericAccountId as AccountId } from '@polkadot/types'
+import { Null, u64, Text, Vec, GenericAccountId as AccountId, BTreeSet } from '@polkadot/types'
 import { RegistryTypes } from '@polkadot/types/types'
 import { JoyBTreeSet, JoyEnum, JoyStructDecorated } from './common'
 
@@ -108,6 +108,9 @@ export class UploadParameters
   })
   implements UploadParametersType {}
 
+export class ContentId extends Text {}
+export class ContentIdSet extends BTreeSet.with(ContentId) {}
+
 export const storageTypes: RegistryTypes = {
   StorageBucketId,
   StorageBucketsPerBagValueConstraint,
@@ -127,5 +130,7 @@ export const storageTypes: RegistryTypes = {
   UploadParameters,
   StorageBucketIdSet,
   DataObjectIdSet,
+  ContentIdSet,
+  ContentId
 }
 export default storageTypes

Some files were not shown because too many files changed in this diff