Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
171 changes: 136 additions & 35 deletions packages/apps-config/src/api/spec/avail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,62 +8,137 @@ import type { OverrideBundleDefinition } from '@polkadot/types/types';

const definitions: OverrideBundleDefinition = {
rpc: {
kate: {
blockLength: {
description: 'Get Block Length',
blob: {
submitBlob: {
description: 'Submit a blob and its signed metadata transaction',
params: [
{
name: 'metadata_signed_transaction',
type: 'String'
},
{
name: 'blob',
type: 'String'
}
],
type: 'Null'
},
getBlob: {
description: 'Get blob data by blob hash',
params: [
{
name: 'blob_hash',
type: 'H256'
},
{
name: 'at',
type: 'Hash',
isOptional: true
}
],
type: 'BlockLength'
type: 'Blob'
},
queryProof: {
description: 'Generate the kate proof for the given `cells`',
getBlobInfo: {
description: 'Get blob inclusion and ownership information',
params: [
{
name: 'cells',
type: 'Vec<Cell>'
name: 'blob_hash',
type: 'H256'
}
],
type: 'BlobInfo'
},
inclusionProof: {
description: 'Generate the inclusion proof for the given blob hash',
params: [
{
name: 'blob_hash',
type: 'H256'
},
{
name: 'at',
type: 'Hash',
isOptional: true
}
],
type: 'Vec<(U256, [u8; 48])>'
type: 'DataProof'
},
queryDataProof: {
description: 'Generate the data proof for the given `transaction_index`',
getBlobsSummary: {
description: 'Get included blob summaries for a block',
params: [
{
name: 'transaction_index',
type: 'u32'
name: 'at',
type: 'Hash',
isOptional: true
}
],
type: 'Vec<BlobSummary>'
},
getBlobsByAppId: {
description: 'Get blob hashes for an AppId in a block',
params: [
{
name: 'app_id',
type: 'AppId'
},
{
name: 'at',
type: 'Hash',
isOptional: true
}
],
type: 'ProofResponse'
type: 'Vec<H256>'
},
queryRows: {
description: 'Query rows based on their indices',
getEvalData: {
description: 'Get FRI evaluation data for a blob',
params: [
{
name: 'rows',
name: 'blob_hash',
type: 'H256'
},
{
name: 'at',
type: 'Hash',
isOptional: true
}
],
type: 'BlobEvalData'
},
getSamplingProof: {
description: 'Get FRI sampling proofs for blob cells',
params: [
{
name: 'cells',
type: 'Vec<u32>'
},
{
name: 'blob_hash',
type: 'H256'
},
{
name: 'at',
type: 'Hash',
isOptional: true
}
],
type: 'Vec<SamplingProof>'
}
},
bridge: {
queryDataProof: {
description: 'Generate the data proof for the given `transaction_index`',
params: [
{
name: 'transaction_index',
type: 'u32'
},
{
name: 'at',
type: 'Hash',
isOptional: true
}
],
type: 'Vec<Vec<U256>>'
type: 'ProofResponse'
}
}
},
Expand All @@ -73,29 +148,22 @@ const definitions: OverrideBundleDefinition = {
minmax: [0, undefined],
types: {
AppId: 'Compact<u32>',
DataLookupItem: {
appId: 'AppId',
start: 'Compact<u32>'
FriParamsVersion: {
_enum: ['V0']
},
CompactDataLookup: {
size: 'Compact<u32>',
index: 'Vec<DataLookupItem>'
FriBlobCommitment: {
blobHash: 'H256',
sizeBytes: 'u64',
commitment: 'Vec<u8>'
},
KateCommitment: {
rows: 'Compact<u16>',
cols: 'Compact<u16>',
commitment: 'Vec<u8>',
FriV1HeaderExtension: {
blobs: 'Vec<FriBlobCommitment>',
paramsVersion: 'FriParamsVersion',
dataRoot: 'H256'
},
V3HeaderExtension: {
appLookup: 'CompactDataLookup',
commitment: 'KateCommitment'
},
HeaderExtension: {
_enum: {
V1: 'V3HeaderExtension',
V2: 'V3HeaderExtension',
V3: 'V3HeaderExtension'
V1: 'FriV1HeaderExtension'
}
},
DaHeader: {
Expand Down Expand Up @@ -170,6 +238,39 @@ const definitions: OverrideBundleDefinition = {
},
BoundedData: 'Vec<u8>',
ArbitraryMessage: 'BoundedData',
Blob: {
blobHash: 'H256',
data: 'Vec<u8>',
size: 'u64'
},
OwnershipEntry: {
address: 'AccountId32',
babeKey: 'AuthorityId',
encodedPeerId: 'String',
signature: 'Vec<u8>'
},
BlobInfo: {
hash: 'H256',
blockHash: 'H256',
blockNumber: 'u32',
ownership: 'Vec<OwnershipEntry>'
},
BlobSummary: {
hash: 'H256',
txIndex: 'u32',
appId: 'AppId',
sizeBytes: 'u64'
},
BlobEvalData: {
evalPointSeed: '[u8; 32]',
evalClaim: '[u8; 16]',
evalProof: 'Vec<u8>'
},
SamplingProof: {
index: 'u32',
cell: 'Vec<u8>',
proof: 'Vec<u8>'
},
Cell: {
row: 'BlockLengthRows',
col: 'BlockLengthColumns'
Expand Down
Loading