Skip to main content

Reference / Modules / node-api / Adapters

Class: Adapters

node-api.Adapters

Table of contents​

Constructors​

Properties​

Methods​

Constructors​

constructor​

• new Adapters(api): Adapters

Parameters​

NameType
apiApiPromise

Returns​

Adapters

Defined in​

Adapters.ts:62

Properties​

api​

• Private Readonly api: ApiPromise

Defined in​

Adapters.ts:66


defaultRegion​

• Private Optional defaultRegion: LogionRuntimeRegion

Defined in​

Adapters.ts:595

Methods​

emptyPalletLogionLocItemsParams​

▸ emptyPalletLogionLocItemsParams(): PalletLogionLocItemsParams

Returns​

PalletLogionLocItemsParams

Defined in​

Adapters.ts:639


fromFrameSystemAccountInfo​

▸ fromFrameSystemAccountInfo(accountData): TypesAccountData

Parameters​

NameType
accountDataFrameSystemAccountInfo

Returns​

TypesAccountData

Defined in​

Adapters.ts:81


fromLocId​

▸ fromLocId(locId): UUID

Parameters​

NameType
locIdu128

Returns​

UUID

Defined in​

Adapters.ts:395


fromLogionRuntimeRegion​

▸ fromLogionRuntimeRegion(region): "Europe"

Parameters​

NameType
regionLogionRuntimeRegion

Returns​

"Europe"

Defined in​

Adapters.ts:586


fromPalletLogionLocLegalOfficerCase​

▸ fromPalletLogionLocLegalOfficerCase(rawLoc): LegalOfficerCase

Parameters​

NameType
rawLocPalletLogionLocLegalOfficerCase

Returns​

LegalOfficerCase

Defined in​

Adapters.ts:89


fromPalletLogionLocSupportedAccountId​

▸ fromPalletLogionLocSupportedAccountId(accountId): ValidAccountId

Parameters​

NameType
accountIdPalletLogionLocSupportedAccountId

Returns​

ValidAccountId

Defined in​

Adapters.ts:409


fromSponsorshipId​

▸ fromSponsorshipId(sponsorshipId): UUID

Parameters​

NameType
sponsorshipIdu128

Returns​

UUID

Defined in​

Adapters.ts:528


getDefaultLogionRuntimeRegion​

▸ getDefaultLogionRuntimeRegion(): LogionRuntimeRegion

Returns​

LogionRuntimeRegion

Defined in​

Adapters.ts:590


getValidAccountId​

▸ getValidAccountId(accountId, type): ValidAccountId

Parameters​

NameType
accountIdstring
typeAccountType

Returns​

ValidAccountId

Defined in​

Adapters.ts:559


getValidPolkadotAccountId​

▸ getValidPolkadotAccountId(accountId): ValidAccountId

Parameters​

NameType
accountIdstring

Returns​

ValidAccountId

Defined in​

Adapters.ts:555


newTokensRecordFileVec​

▸ newTokensRecordFileVec(files): Vec<PalletLogionLocTokensRecordFile>

Parameters​

NameType
filesTypesTokensRecordFile[]

Returns​

Vec<PalletLogionLocTokensRecordFile>

Defined in​

Adapters.ts:499


toAccountId​

▸ toAccountId(accountId): ValidAccountId

Parameters​

NameType
accountIdPalletLogionLocSupportedAccountId

Returns​

ValidAccountId

Defined in​

Adapters.ts:541


toCall​

▸ toCall(submittable): Call

Parameters​

NameType
submittableSubmittableExtrinsic

Returns​

Call

Defined in​

Adapters.ts:77


toCollectionItemFile​

▸ toCollectionItemFile(itemFile): Object

Parameters​

NameType
itemFileItemFile

Returns​

Object

NameType
contentTypeH256
hash_H256
nameH256
size_bigint

Defined in​

Adapters.ts:461


toCollectionItemToken​

▸ toCollectionItemToken(itemToken?): null | { tokenId: H256 ; tokenIssuance: bigint ; tokenType: H256 }

Parameters​

NameType
itemToken?ItemToken

Returns​

null | { tokenId: H256 ; tokenIssuance: bigint ; tokenType: H256 }

Defined in​

Adapters.ts:470


toCompactU128Uuid​

▸ toCompactU128Uuid(id): Compact<u128>

Parameters​

NameType
idUUID

Returns​

Compact<u128>

Defined in​

Adapters.ts:383


toH256​

▸ toH256(data): H256

Parameters​

NameType
dataHash

Returns​

H256

Defined in​

Adapters.ts:615


toHostData​

▸ toHostData(legalOfficerData): Partial<HostData>

Parameters​

NameType
legalOfficerDataPalletLoAuthorityListLegalOfficerData

Returns​

Partial<HostData>

Defined in​

Adapters.ts:597


toLocId​

▸ toLocId(id): Compact<u128>

Parameters​

NameType
idUUID

Returns​

Compact<u128>

Defined in​

Adapters.ts:379


toLogionRuntimeRegion​

▸ toLogionRuntimeRegion(region): LogionRuntimeRegion

Parameters​

NameType
region"Europe"

Returns​

LogionRuntimeRegion

Defined in​

Adapters.ts:582


toNonCompactLocId​

▸ toNonCompactLocId(id): u128

Parameters​

NameType
idUUID

Returns​

u128

Defined in​

Adapters.ts:387


toNonCompactSponsorshipId​

▸ toNonCompactSponsorshipId(id): u128

Parameters​

NameType
idUUID

Returns​

u128

Defined in​

Adapters.ts:524


toNonCompactU128Uuid​

▸ toNonCompactU128Uuid(id): u128

Parameters​

NameType
idUUID

Returns​

u128

Defined in​

Adapters.ts:391


toPalletLoAuthorityListHostDataParam​

▸ toPalletLoAuthorityListHostDataParam(params): PalletLoAuthorityListHostDataParam

Parameters​

NameType
paramsObject
params.baseUrlundefined | string
params.nodeIdundefined | string
params.region"Europe"

Returns​

PalletLoAuthorityListHostDataParam

Defined in​

Adapters.ts:647


toPalletLoAuthorityListLegalOfficerDataHost​

▸ toPalletLoAuthorityListLegalOfficerDataHost(legalOfficerData): PalletLoAuthorityListLegalOfficerDataParam

Parameters​

NameType
legalOfficerDataPartial<HostData>

Returns​

PalletLoAuthorityListLegalOfficerDataParam

Defined in​

Adapters.ts:564


toPalletLogionLocFile​

▸ toPalletLogionLocFile(file): PalletLogionLocFileParams

Parameters​

NameType
fileFileParams

Returns​

PalletLogionLocFileParams

Defined in​

Adapters.ts:68


toPalletLogionLocItemsParams​

▸ toPalletLogionLocItemsParams(items): PalletLogionLocItemsParams

Parameters​

NameType
itemsObject
items.filesFileParams[]
items.linksLinkParams[]
items.metadataMetadataItemParams[]

Returns​

PalletLogionLocItemsParams

Defined in​

Adapters.ts:627


toPalletLogionLocLocLinkParams​

▸ toPalletLogionLocLocLinkParams(link): PalletLogionLocLocLinkParams

Parameters​

NameType
linkLinkParams

Returns​

PalletLogionLocLocLinkParams

Defined in​

Adapters.ts:619


toPalletLogionLocMetadataItem​

▸ toPalletLogionLocMetadataItem(item): PalletLogionLocMetadataItemParams

Parameters​

NameType
itemMetadataItemParams

Returns​

PalletLogionLocMetadataItemParams

Defined in​

Adapters.ts:423


toPalletLogionLocOtherAccountId​

▸ toPalletLogionLocOtherAccountId(accountId): PalletLogionLocOtherAccountId

Parameters​

NameType
accountIdOtherAccountId

Returns​

PalletLogionLocOtherAccountId

Defined in​

Adapters.ts:516


toPalletLogionLocSupportedAccountId​

▸ toPalletLogionLocSupportedAccountId(accountId): PalletLogionLocSupportedAccountId

Parameters​

NameType
accountIdValidAccountId

Returns​

PalletLogionLocSupportedAccountId

Defined in​

Adapters.ts:399


toPalletLogionLocTokensRecordFile​

▸ toPalletLogionLocTokensRecordFile(file): PalletLogionLocTokensRecordFile

Parameters​

NameType
fileTypesTokensRecordFile

Returns​

PalletLogionLocTokensRecordFile

Defined in​

Adapters.ts:490


toSponsorship​

▸ toSponsorship(sponsorship): Sponsorship

Parameters​

NameType
sponsorshipPalletLogionLocSponsorship

Returns​

Sponsorship

Defined in​

Adapters.ts:532


toSponsorshipId​

▸ toSponsorshipId(id): Compact<u128>

Parameters​

NameType
idUUID

Returns​

Compact<u128>

Defined in​

Adapters.ts:520


toTermsAndConditionsElement​

▸ toTermsAndConditionsElement(tc): Object

Parameters​

NameType
tcTermsAndConditionsElement

Returns​

Object

NameType
detailsH256
tcLocstring
tcTypeH256

Defined in​

Adapters.ts:482


asArray​

▸ asArray(anyJson): AnyJson[]

Parameters​

NameType
anyJsonAnyJson

Returns​

AnyJson[]

Defined in​

Adapters.ts:188


asBigInt​

▸ asBigInt(anyJson): bigint

Parameters​

NameType
anyJsonAnyJson

Returns​

bigint

Defined in​

Adapters.ts:212


asHexString​

▸ asHexString(anyJson): `0x${string}`

Parameters​

NameType
anyJsonAnyJson

Returns​

`0x${string}`

Defined in​

Adapters.ts:200


asJsonCall​

▸ asJsonCall(anyJson): TypesJsonCall

Parameters​

NameType
anyJsonAnyJson

Returns​

TypesJsonCall

Defined in​

Adapters.ts:227


asJsonObject​

▸ asJsonObject(anyJson): TypesJsonObject

Parameters​

NameType
anyJsonAnyJson

Returns​

TypesJsonObject

Defined in​

Adapters.ts:164


asString​

▸ asString(anyJson): string

Parameters​

NameType
anyJsonAnyJson

Returns​

string

Defined in​

Adapters.ts:176


fromPalletCollectionItem​

▸ fromPalletCollectionItem(itemId, unwrappedResult): CollectionItem

Parameters​

NameType
itemIdHash
unwrappedResultPalletLogionLocCollectionItem

Returns​

CollectionItem

Defined in​

Adapters.ts:431


getErrorMessage​

▸ getErrorMessage(dispatchError): string

Parameters​

NameType
dispatchErrorDispatchError

Returns​

string

Defined in​

Adapters.ts:370


getErrorMetadata​

▸ getErrorMetadata(dispatchError): TypesErrorMetadata

Parameters​

NameType
dispatchErrorDispatchError

Returns​

TypesErrorMetadata

Defined in​

Adapters.ts:254


getEventData​

▸ getEventData(json): TypesJsonObject | AnyJson[]

Parameters​

NameType
jsonAnyJson

Returns​

TypesJsonObject | AnyJson[]

Defined in​

Adapters.ts:246


getExtrinsicEvents​

▸ getExtrinsicEvents(result): TypesEvent[]

Parameters​

NameType
resultISubmittableResult

Returns​

TypesEvent[]

Defined in​

Adapters.ts:235


isArray​

▸ isArray(anyJson): anyJson is AnyJson[]

Parameters​

NameType
anyJsonAnyJson

Returns​

anyJson is AnyJson[]

Defined in​

Adapters.ts:184


isHexString​

▸ isHexString(anyJson): anyJson is `0x${string}`

Parameters​

NameType
anyJsonAnyJson

Returns​

anyJson is `0x${string}`

Defined in​

Adapters.ts:196


isJsonCall​

▸ isJsonCall(anyJson): anyJson is TypesJsonCall

Parameters​

NameType
anyJsonAnyJson

Returns​

anyJson is TypesJsonCall

Defined in​

Adapters.ts:220


isJsonObject​

▸ isJsonObject(anyJson): anyJson is TypesJsonObject

Parameters​

NameType
anyJsonAnyJson

Returns​

anyJson is TypesJsonObject

Defined in​

Adapters.ts:160


isNumberString​

▸ isNumberString(anyJson): anyJson is string

Parameters​

NameType
anyJsonAnyJson

Returns​

anyJson is string

Defined in​

Adapters.ts:208


isString​

▸ isString(anyJson): anyJson is string

Parameters​

NameType
anyJsonAnyJson

Returns​

anyJson is string

Defined in​

Adapters.ts:172


toJsonCall​

▸ toJsonCall(genericCall): TypesJsonCall

Parameters​

NameType
genericCallCallBase<AnyTuple, FunctionMetadataLatest>

Returns​

TypesJsonCall

Defined in​

Adapters.ts:144


toLocId​

▸ toLocId(id): string

Parameters​

NameType
idUUID

Returns​

string

Defined in​

Adapters.ts:375


toTokensRecord​

▸ toTokensRecord(substrateObject): TypesTokensRecord

Parameters​

NameType
substrateObjectPalletLogionLocTokensRecord

Returns​

TypesTokensRecord

Defined in​

Adapters.ts:503