Reference / Modules / node-api / Adapters
Class: Adapters
node-api.Adapters
Table of contents
Constructors
Properties
Methods
- emptyPalletLogionLocItemsParams
- fromFrameSystemAccountInfo
- fromLocId
- fromLogionRuntimeRegion
- fromPalletLogionLocLegalOfficerCase
- fromPalletLogionLocSupportedAccountId
- fromSponsorshipId
- getDefaultLogionRuntimeRegion
- getValidAccountId
- getValidPolkadotAccountId
- newTokensRecordFileVec
- toAccountId
- toCall
- toCollectionItemFile
- toCollectionItemToken
- toCompactU128Uuid
- toH256
- toHostData
- toLocId
- toLogionRuntimeRegion
- toNonCompactLocId
- toNonCompactSponsorshipId
- toNonCompactU128Uuid
- toPalletLoAuthorityListHostDataParam
- toPalletLoAuthorityListLegalOfficerDataHost
- toPalletLogionLocFile
- toPalletLogionLocItemsParams
- toPalletLogionLocLocLinkParams
- toPalletLogionLocMetadataItem
- toPalletLogionLocOtherAccountId
- toPalletLogionLocSupportedAccountId
- toPalletLogionLocTokensRecordFile
- toSponsorship
- toSponsorshipId
- toTermsAndConditionsElement
- asArray
- asBigInt
- asHexString
- asJsonCall
- asJsonObject
- asString
- fromPalletCollectionItem
- getErrorMessage
- getErrorMetadata
- getEventData
- getExtrinsicEvents
- isArray
- isHexString
- isJsonCall
- isJsonObject
- isNumberString
- isString
- toJsonCall
- toLocId
- toTokensRecord
Constructors
constructor
• new Adapters(api): Adapters
Parameters
| Name | Type |
|---|---|
api | ApiPromise |
Returns
Defined in
Properties
api
• Private Readonly api: ApiPromise
Defined in
defaultRegion
• Private Optional defaultRegion: LogionRuntimeRegion
Defined in
Methods
emptyPalletLogionLocItemsParams
▸ emptyPalletLogionLocItemsParams(): PalletLogionLocItemsParams
Returns
PalletLogionLocItemsParams
Defined in
fromFrameSystemAccountInfo
▸ fromFrameSystemAccountInfo(accountData): TypesAccountData
Parameters
| Name | Type |
|---|---|
accountData | FrameSystemAccountInfo |
Returns
Defined in
fromLocId
▸ fromLocId(locId): UUID
Parameters
| Name | Type |
|---|---|
locId | u128 |
Returns
Defined in
fromLogionRuntimeRegion
▸ fromLogionRuntimeRegion(region): "Europe"
Parameters
| Name | Type |
|---|---|
region | LogionRuntimeRegion |
Returns
"Europe"
Defined in
fromPalletLogionLocLegalOfficerCase
▸ fromPalletLogionLocLegalOfficerCase(rawLoc): LegalOfficerCase
Parameters
| Name | Type |
|---|---|
rawLoc | PalletLogionLocLegalOfficerCase |
Returns
Defined in
fromPalletLogionLocSupportedAccountId
▸ fromPalletLogionLocSupportedAccountId(accountId): ValidAccountId
Parameters
| Name | Type |
|---|---|
accountId | PalletLogionLocSupportedAccountId |
Returns
Defined in
fromSponsorshipId
▸ fromSponsorshipId(sponsorshipId): UUID
Parameters
| Name | Type |
|---|---|
sponsorshipId | u128 |
Returns
Defined in
getDefaultLogionRuntimeRegion
▸ getDefaultLogionRuntimeRegion(): LogionRuntimeRegion
Returns
LogionRuntimeRegion
Defined in
getValidAccountId
▸ getValidAccountId(accountId, type): ValidAccountId
Parameters
| Name | Type |
|---|---|
accountId | string |
type | AccountType |
Returns
Defined in
getValidPolkadotAccountId
▸ getValidPolkadotAccountId(accountId): ValidAccountId
Parameters
| Name | Type |
|---|---|
accountId | string |
Returns
Defined in
newTokensRecordFileVec
▸ newTokensRecordFileVec(files): Vec<PalletLogionLocTokensRecordFile>
Parameters
| Name | Type |
|---|---|
files | TypesTokensRecordFile[] |
Returns
Vec<PalletLogionLocTokensRecordFile>
Defined in
toAccountId
▸ toAccountId(accountId): ValidAccountId
Parameters
| Name | Type |
|---|---|
accountId | PalletLogionLocSupportedAccountId |
Returns
Defined in
toCall
▸ toCall(submittable): Call
Parameters
| Name | Type |
|---|---|
submittable | SubmittableExtrinsic |
Returns
Call
Defined in
toCollectionItemFile
▸ toCollectionItemFile(itemFile): Object
Parameters
| Name | Type |
|---|---|
itemFile | ItemFile |
Returns
Object
| Name | Type |
|---|---|
contentType | H256 |
hash_ | H256 |
name | H256 |
size_ | bigint |
Defined in
toCollectionItemToken
▸ toCollectionItemToken(itemToken?): null | { tokenId: H256 ; tokenIssuance: bigint ; tokenType: H256 }
Parameters
| Name | Type |
|---|---|
itemToken? | ItemToken |
Returns
null | { tokenId: H256 ; tokenIssuance: bigint ; tokenType: H256 }
Defined in
toCompactU128Uuid
▸ toCompactU128Uuid(id): Compact<u128>
Parameters
| Name | Type |
|---|---|
id | UUID |
Returns
Compact<u128>
Defined in
toH256
▸ toH256(data): H256
Parameters
| Name | Type |
|---|---|
data | Hash |
Returns
H256
Defined in
toHostData
▸ toHostData(legalOfficerData): Partial<HostData>
Parameters
| Name | Type |
|---|---|
legalOfficerData | PalletLoAuthorityListLegalOfficerData |
Returns
Partial<HostData>
Defined in
toLocId
▸ toLocId(id): Compact<u128>
Parameters
| Name | Type |
|---|---|
id | UUID |
Returns
Compact<u128>
Defined in
toLogionRuntimeRegion
▸ toLogionRuntimeRegion(region): LogionRuntimeRegion
Parameters
| Name | Type |
|---|---|
region | "Europe" |
Returns
LogionRuntimeRegion
Defined in
toNonCompactLocId
▸ toNonCompactLocId(id): u128
Parameters
| Name | Type |
|---|---|
id | UUID |
Returns
u128
Defined in
toNonCompactSponsorshipId
▸ toNonCompactSponsorshipId(id): u128
Parameters
| Name | Type |
|---|---|
id | UUID |
Returns
u128
Defined in
toNonCompactU128Uuid
▸ toNonCompactU128Uuid(id): u128
Parameters
| Name | Type |
|---|---|
id | UUID |
Returns
u128
Defined in
toPalletLoAuthorityListHostDataParam
▸ toPalletLoAuthorityListHostDataParam(params): PalletLoAuthorityListHostDataParam
Parameters
| Name | Type |
|---|---|
params | Object |
params.baseUrl | undefined | string |
params.nodeId | undefined | string |
params.region | "Europe" |
Returns
PalletLoAuthorityListHostDataParam
Defined in
toPalletLoAuthorityListLegalOfficerDataHost
▸ toPalletLoAuthorityListLegalOfficerDataHost(legalOfficerData): PalletLoAuthorityListLegalOfficerDataParam
Parameters
| Name | Type |
|---|---|
legalOfficerData | Partial<HostData> |
Returns
PalletLoAuthorityListLegalOfficerDataParam
Defined in
toPalletLogionLocFile
▸ toPalletLogionLocFile(file): PalletLogionLocFileParams
Parameters
| Name | Type |
|---|---|
file | FileParams |
Returns
PalletLogionLocFileParams
Defined in
toPalletLogionLocItemsParams
▸ toPalletLogionLocItemsParams(items): PalletLogionLocItemsParams
Parameters
| Name | Type |
|---|---|
items | Object |
items.files | FileParams[] |
items.links | LinkParams[] |
items.metadata | MetadataItemParams[] |
Returns
PalletLogionLocItemsParams
Defined in
toPalletLogionLocLocLinkParams
▸ toPalletLogionLocLocLinkParams(link): PalletLogionLocLocLinkParams
Parameters
| Name | Type |
|---|---|
link | LinkParams |
Returns
PalletLogionLocLocLinkParams
Defined in
toPalletLogionLocMetadataItem
▸ toPalletLogionLocMetadataItem(item): PalletLogionLocMetadataItemParams
Parameters
| Name | Type |
|---|---|
item | MetadataItemParams |
Returns
PalletLogionLocMetadataItemParams
Defined in
toPalletLogionLocOtherAccountId
▸ toPalletLogionLocOtherAccountId(accountId): PalletLogionLocOtherAccountId
Parameters
| Name | Type |
|---|---|
accountId | OtherAccountId |
Returns
PalletLogionLocOtherAccountId
Defined in
toPalletLogionLocSupportedAccountId
▸ toPalletLogionLocSupportedAccountId(accountId): PalletLogionLocSupportedAccountId
Parameters
| Name | Type |
|---|---|
accountId | ValidAccountId |
Returns
PalletLogionLocSupportedAccountId
Defined in
toPalletLogionLocTokensRecordFile
▸ toPalletLogionLocTokensRecordFile(file): PalletLogionLocTokensRecordFile
Parameters
| Name | Type |
|---|---|
file | TypesTokensRecordFile |
Returns
PalletLogionLocTokensRecordFile
Defined in
toSponsorship
▸ toSponsorship(sponsorship): Sponsorship
Parameters
| Name | Type |
|---|---|
sponsorship | PalletLogionLocSponsorship |
Returns
Defined in
toSponsorshipId
▸ toSponsorshipId(id): Compact<u128>
Parameters
| Name | Type |
|---|---|
id | UUID |
Returns
Compact<u128>
Defined in
toTermsAndConditionsElement
▸ toTermsAndConditionsElement(tc): Object
Parameters
| Name | Type |
|---|---|
tc | TermsAndConditionsElement |
Returns
Object
| Name | Type |
|---|---|
details | H256 |
tcLoc | string |
tcType | H256 |
Defined in
asArray
▸ asArray(anyJson): AnyJson[]
Parameters
| Name | Type |
|---|---|
anyJson | AnyJson |
Returns
AnyJson[]
Defined in
asBigInt
▸ asBigInt(anyJson): bigint
Parameters
| Name | Type |
|---|---|
anyJson | AnyJson |
Returns
bigint
Defined in
asHexString
▸ asHexString(anyJson): `0x${string}`
Parameters
| Name | Type |
|---|---|
anyJson | AnyJson |
Returns
`0x${string}`
Defined in
asJsonCall
▸ asJsonCall(anyJson): TypesJsonCall
Parameters
| Name | Type |
|---|---|
anyJson | AnyJson |
Returns
Defined in
asJsonObject
▸ asJsonObject(anyJson): TypesJsonObject
Parameters
| Name | Type |
|---|---|
anyJson | AnyJson |
Returns
Defined in
asString
▸ asString(anyJson): string
Parameters
| Name | Type |
|---|---|
anyJson | AnyJson |
Returns
string
Defined in
fromPalletCollectionItem
▸ fromPalletCollectionItem(itemId, unwrappedResult): CollectionItem
Parameters
| Name | Type |
|---|---|
itemId | Hash |
unwrappedResult | PalletLogionLocCollectionItem |
Returns
Defined in
getErrorMessage
▸ getErrorMessage(dispatchError): string
Parameters
| Name | Type |
|---|---|
dispatchError | DispatchError |
Returns
string
Defined in
getErrorMetadata
▸ getErrorMetadata(dispatchError): TypesErrorMetadata
Parameters
| Name | Type |
|---|---|
dispatchError | DispatchError |
Returns
Defined in
getEventData
▸ getEventData(json): TypesJsonObject | AnyJson[]
Parameters
| Name | Type |
|---|---|
json | AnyJson |
Returns
TypesJsonObject | AnyJson[]
Defined in
getExtrinsicEvents
▸ getExtrinsicEvents(result): TypesEvent[]
Parameters
| Name | Type |
|---|---|
result | ISubmittableResult |
Returns
Defined in
isArray
▸ isArray(anyJson): anyJson is AnyJson[]
Parameters
| Name | Type |
|---|---|
anyJson | AnyJson |
Returns
anyJson is AnyJson[]
Defined in
isHexString
▸ isHexString(anyJson): anyJson is `0x${string}`
Parameters
| Name | Type |
|---|---|
anyJson | AnyJson |
Returns
anyJson is `0x${string}`
Defined in
isJsonCall
▸ isJsonCall(anyJson): anyJson is TypesJsonCall
Parameters
| Name | Type |
|---|---|
anyJson | AnyJson |
Returns
anyJson is TypesJsonCall
Defined in
isJsonObject
▸ isJsonObject(anyJson): anyJson is TypesJsonObject
Parameters
| Name | Type |
|---|---|
anyJson | AnyJson |
Returns
anyJson is TypesJsonObject
Defined in
isNumberString
▸ isNumberString(anyJson): anyJson is string
Parameters
| Name | Type |
|---|---|
anyJson | AnyJson |
Returns
anyJson is string
Defined in
isString
▸ isString(anyJson): anyJson is string
Parameters
| Name | Type |
|---|---|
anyJson | AnyJson |
Returns
anyJson is string
Defined in
toJsonCall
▸ toJsonCall(genericCall): TypesJsonCall
Parameters
| Name | Type |
|---|---|
genericCall | CallBase<AnyTuple, FunctionMetadataLatest> |
Returns
Defined in
toLocId
▸ toLocId(id): string
Parameters
| Name | Type |
|---|---|
id | UUID |
Returns
string
Defined in
toTokensRecord
▸ toTokensRecord(substrateObject): TypesTokensRecord
Parameters
| Name | Type |
|---|---|
substrateObject | PalletLogionLocTokensRecord |