This package contains serializers and deserializers for converting between various representations of Dark Forest data, for example between raw data received from blockchain calls to Dark Forest contracts and the typescript types used across the client.
You can install this package using npm
or
yarn
by running:
npm install --save @dfares/serde
yarn add @dfares/serde
When using this in a plugin, you might want to load it with skypack
import * as serde from 'http://cdn.skypack.dev/@dfares/serde';
- RawArrival
- RawArtifactPointValues
- RawArtifactWithMetadata
- RawBurnedCoords
- RawClaimedCoords
- RawKardashevCoords
- RawPlanet
- RawPlayer
- RawRevealedCoords
- RawUnion
- RawUpgrade
- RawUpgradesBranches
- address
- artifactIdFromDecStr
- artifactIdFromEthersBN
- artifactIdFromHexStr
- artifactIdToDecStr
- decodeArrival
- decodeArtifact
- decodeArtifactPointValues
- decodeBurnedCoords
- decodeClaimedCoords
- decodeKardashevCoords
- decodePlanet
- decodePlanetDefaults
- decodePlayer
- decodeRevealedCoords
- decodeUnion
- decodeUpgrade
- decodeUpgradeBranches
- hashToInt
- isNetworkEvent
- isUnconfirmedAcceptApplication
- isUnconfirmedAcceptApplicationTx
- isUnconfirmedAcceptInvite
- isUnconfirmedAcceptInviteTx
- isUnconfirmedActivateArtifact
- isUnconfirmedActivateArtifactTx
- isUnconfirmedAddMemberByAdmin
- isUnconfirmedAddMemberByAdminTx
- isUnconfirmedBlue
- isUnconfirmedBlueTx
- isUnconfirmedBurn
- isUnconfirmedBurnTx
- isUnconfirmedBuyArtifact
- isUnconfirmedBuyArtifactTx
- isUnconfirmedBuyHat
- isUnconfirmedBuyHatTx
- isUnconfirmedBuyPlanet
- isUnconfirmedBuyPlanetTx
- isUnconfirmedBuySpaceship
- isUnconfirmedBuySpaceshipTx
- isUnconfirmedCancelApplication
- isUnconfirmedCancelApplicationTx
- isUnconfirmedCancelInvite
- isUnconfirmedCancelInviteTx
- isUnconfirmedCapturePlanet
- isUnconfirmedCapturePlanetTx
- isUnconfirmedChangeArtifactImageType
- isUnconfirmedChangeArtifactImageTypeTx
- isUnconfirmedChangeUnionName
- isUnconfirmedChangeUnionNameTx
- isUnconfirmedClaim
- isUnconfirmedClaimTx
- isUnconfirmedCreateUnion
- isUnconfirmedCreateUnionTx
- isUnconfirmedDeactivateArtifact
- isUnconfirmedDeactivateArtifactTx
- isUnconfirmedDepositArtifact
- isUnconfirmedDepositArtifactTx
- isUnconfirmedDisbandUnion
- isUnconfirmedDisbandUnionTx
- isUnconfirmedDonate
- isUnconfirmedDonateTx
- isUnconfirmedFindArtifact
- isUnconfirmedFindArtifactTx
- isUnconfirmedGetShips
- isUnconfirmedGetShipsTx
- isUnconfirmedInit
- isUnconfirmedInitTx
- isUnconfirmedInvadePlanet
- isUnconfirmedInvadePlanetTx
- isUnconfirmedInviteMember
- isUnconfirmedInviteMemberTx
- isUnconfirmedKardashev
- isUnconfirmedKardashevTx
- isUnconfirmedKickMember
- isUnconfirmedKickMemberTx
- isUnconfirmedLeaveUnion
- isUnconfirmedLeaveUnionTx
- isUnconfirmedLevelUpUnion
- isUnconfirmedLevelUpUnionTx
- isUnconfirmedMove
- isUnconfirmedMoveTx
- isUnconfirmedPink
- isUnconfirmedPinkTx
- isUnconfirmedProspectPlanet
- isUnconfirmedProspectPlanetTx
- isUnconfirmedRefreshPlanet
- isUnconfirmedRefreshPlanetTx
- isUnconfirmedRejectApplication
- isUnconfirmedRejectApplicationTx
- isUnconfirmedRelease
- isUnconfirmedReleaseTx
- isUnconfirmedReveal
- isUnconfirmedRevealTx
- isUnconfirmedSendApplication
- isUnconfirmedSendApplicationTx
- isUnconfirmedTransfer
- isUnconfirmedTransferLeaderRole
- isUnconfirmedTransferLeaderRoleTx
- isUnconfirmedTransferTx
- isUnconfirmedUpgrade
- isUnconfirmedUpgradeTx
- isUnconfirmedUseKey
- isUnconfirmedUseKeyTx
- isUnconfirmedWithdrawArtifact
- isUnconfirmedWithdrawArtifactTx
- isUnconfirmedWithdrawSilver
- isUnconfirmedWithdrawSilverTx
- locationIdFromBigInt
- locationIdFromDecStr
- locationIdFromEthersBN
- locationIdFromHexStr
- locationIdToDecStr
Ƭ RawArrival: Awaited
<ReturnType
<DarkForest
["getPlanetArrival"
]>>
Ƭ RawArtifactPointValues: Awaited
<ReturnType
<DarkForest
["getArtifactPointValues"
]>>
Ƭ RawArtifactWithMetadata: Awaited
<ReturnType
<DarkForest
["getArtifactById"
]>>
Ƭ RawBurnedCoords: Awaited
<ReturnType
<DarkForest
["burnedCoords"
]>>
Ƭ RawClaimedCoords: Awaited
<ReturnType
<DarkForest
["claimedCoords"
]>>
Ƭ RawKardashevCoords: Awaited
<ReturnType
<DarkForest
["kardashevCoords"
]>>
Ƭ RawPlanet: Awaited
<ReturnType
<DarkForest
["planets"
]>>
Ƭ RawPlayer: Awaited
<ReturnType
<DarkForest
["players"
]>>
Ƭ RawRevealedCoords: Awaited
<ReturnType
<DarkForest
["revealedCoords"
]>>
Ƭ RawUnion: Awaited
<ReturnType
<DarkForest
["unions"
]>>
Ƭ RawUpgrade: Awaited
<ReturnType
<DarkForest
["getArtifactById"
]>>["upgrade"
]
Ƭ RawUpgradesBranches: Awaited
<ReturnType
<DarkForest
["getUpgrades"
]>>
▸ address(str
): EthAddress
Converts a string to an EthAddress
: a 0x-prefixed all lowercase hex string
of 40 hex characters. An object of the EthAddress
type should only ever be
initialized through this constructor-like method. Throws if the provided
string cannot be parsed as an Ethereum address.
Name | Type | Description |
---|---|---|
str |
string |
An address-like string
|
EthAddress
▸ artifactIdFromDecStr(artifactId
): ArtifactId
Converts a string representing a decimal number into an ArtifactID: a
non-0x-prefixed all lowercase hex string of exactly 64 hex characters
(0-padded if necessary). ArtifactIDs should only be instantiated through
artifactIdFromHexStr
, artifactIdFromDecStr
, and artifactIdFromEthersBN
.
Name | Type | Description |
---|---|---|
artifactId |
string |
string of decimal digits, the base 10 representation of an artifact ID. |
ArtifactId
▸ artifactIdFromEthersBN(artifactId
): ArtifactId
Converts a ethers.js BigNumber (type aliased here as EthersBN) representing a
decimal number into an ArtifactID: a non-0x-prefixed all lowercase hex string
of exactly 64 hex characters (0-padded if necessary). ArtifactIDs should only
be instantiated through artifactIdFromHexStr
, artifactIdFromDecStr
, and
artifactIdFromEthersBN
.
Name | Type | Description |
---|---|---|
artifactId |
BigNumber |
ether.js BigNumber representing artifact's ID |
ArtifactId
▸ artifactIdFromHexStr(artifactId
): ArtifactId
Converts a possibly 0x-prefixed string of hex digits to an ArtifactId
: a
non-0x-prefixed all lowercase hex string of exactly 64 hex characters
(0-padded if necessary). ArtifactIDs should only be instantiated through
artifactIdFromHexStr
, artifactIdFromDecStr
, and artifactIdFromEthersBN
.
Name | Type | Description |
---|---|---|
artifactId |
string |
Possibly 0x-prefixed, possibly unpadded hex string representation of an artifact's ID. |
ArtifactId
▸ artifactIdToDecStr(artifactId
): string
Converts an ArtifactID to a decimal string with equivalent numerical value; can be used if you need to pass an artifact ID into a web3 call.
Name | Type | Description |
---|---|---|
artifactId |
ArtifactId |
non-0x-prefixed lowercase hex string of 64 hex characters representing an artifact's ID |
string
▸ decodeArrival(rawArrival
): QueuedArrival
Converts the raw typechain result of ArrivalTypes.ArrivalData
struct to
to a QueuedArrival
typescript typed object (see @dfares/types)
Name | Type | Description |
---|---|---|
rawArrival |
[BigNumber , string , BigNumber , BigNumber , BigNumber , BigNumber , BigNumber , BigNumber , number , BigNumber ] & { arrivalTime : BigNumber ; arrivalType : number ; carriedArtifactId : BigNumber ; departureTime : BigNumber ; distance : BigNumber ; fromPlanet : BigNumber ; id : BigNumber ; invitees : string [] ; leader : string ; level : BigNumber ; members : string [] ; name : string ; player : string ; popArriving : BigNumber ; silverMoved : BigNumber ; toPlanet : BigNumber ; unionId : BigNumber } |
Raw data of a ArrivalTypes.ArrivalData struct, returned from a blockchain call (assumed to be typed with typechain). |
QueuedArrival
▸ decodeArtifact(rawArtifactWithMetadata
): Artifact
Converts the raw typechain result of ArtifactTypes.ArtifactWithMetadata
struct to an Artifact
typescript typed object (see @dfares/types).
Name | Type | Description |
---|---|---|
rawArtifactWithMetadata |
[[boolean , BigNumber , BigNumber , number , number , BigNumber , string , number , BigNumber , BigNumber , BigNumber , BigNumber , string , BigNumber ] & { activations : BigNumber ; artifactType : number ; controller : string ; discoverer : string ; id : BigNumber ; imageType : BigNumber ; isInitialized : boolean ; lastActivated : BigNumber ; lastDeactivated : BigNumber ; linkTo : BigNumber ; mintedAtTimestamp : BigNumber ; planetBiome : number ; planetDiscoveredOn : BigNumber ; rarity : number }, [BigNumber , BigNumber , BigNumber , BigNumber , BigNumber ] & { defMultiplier : BigNumber ; popCapMultiplier : BigNumber ; popGroMultiplier : BigNumber ; rangeMultiplier : BigNumber ; speedMultiplier : BigNumber }, [BigNumber , BigNumber , BigNumber , BigNumber , BigNumber ] & { defMultiplier : BigNumber ; popCapMultiplier : BigNumber ; popGroMultiplier : BigNumber ; rangeMultiplier : BigNumber ; speedMultiplier : BigNumber }] & { artifact : [boolean , BigNumber , BigNumber , number , number , BigNumber , string , number , BigNumber , BigNumber , BigNumber , BigNumber , string , BigNumber ] & { activations : BigNumber ; artifactType : number ; controller : string ; discoverer : string ; id : BigNumber ; imageType : BigNumber ; isInitialized : boolean ; lastActivated : BigNumber ; lastDeactivated : BigNumber ; linkTo : BigNumber ; mintedAtTimestamp : BigNumber ; planetBiome : number ; planetDiscoveredOn : BigNumber ; rarity : number } ; locationId : BigNumber ; owner : string ; timeDelayedUpgrade : [BigNumber , BigNumber , BigNumber , BigNumber , BigNumber ] & { defMultiplier : BigNumber ; popCapMultiplier : BigNumber ; popGroMultiplier : BigNumber ; rangeMultiplier : BigNumber ; speedMultiplier : BigNumber } ; upgrade : [BigNumber , BigNumber , BigNumber , BigNumber , BigNumber ] & { defMultiplier : BigNumber ; popCapMultiplier : BigNumber ; popGroMultiplier : BigNumber ; rangeMultiplier : BigNumber ; speedMultiplier : BigNumber } ; voyageId : BigNumber } |
Raw data of an ArtifactWithMetadata struct, returned from a blockchain call (assumed to be typed with typechain). |
Artifact
▸ decodeArtifactPointValues(rawPointValues
): ArtifactPointValues
Converts the raw typechain result of a call to
DarkForest.getArtifactPointValues
to an ArtifactPointValues
typescript typed object (see @dfares/types).
Name | Type |
---|---|
rawPointValues |
[BigNumber , BigNumber , BigNumber , BigNumber , BigNumber , BigNumber ] |
ArtifactPointValues
▸ decodeBurnedCoords(rawBurnedCoords
): BurnedCoords
Converts the result of a typechain-typed ethers.js contract call returning a
RevealTypes.RevealedCoords
struct into a RevealedCoords
object (see
dfares/types)
Name | Type |
---|---|
rawBurnedCoords |
[BigNumber , BigNumber , BigNumber , string , BigNumber ] & { burnedAt : BigNumber ; locationId : BigNumber ; operator : string ; x : BigNumber ; y : BigNumber } |
BurnedCoords
▸ decodeClaimedCoords(rawClaimedCoords
): ClaimedCoords
Converts the result of a typechain-typed ethers.js contract call returning a
DarkForestTypes.ClaimedCoords
struct into a ClaimedCoords
object (see
darkforest_eth/types)
Name | Type | Description |
---|---|---|
rawClaimedCoords |
[BigNumber , BigNumber , BigNumber , string , BigNumber , BigNumber ] & { claimedAt : BigNumber ; claimer : string ; locationId : BigNumber ; score : BigNumber ; x : BigNumber ; y : BigNumber } |
the result of a typechain-typed ethers.js contract call returning a DarkForestTypes.RevealedCoords` struct |
ClaimedCoords
▸ decodeKardashevCoords(rawKardashevCoords
): KardashevCoords
Converts the result of a typechain-typed ethers.js contract call returning a
RevealTypes.RevealedCoords
struct into a RevealedCoords
object (see
dfares/types)
Name | Type |
---|---|
rawKardashevCoords |
[BigNumber , BigNumber , BigNumber , string , BigNumber ] & { kardashevAt : BigNumber ; locationId : BigNumber ; operator : string ; x : BigNumber ; y : BigNumber } |
KardashevCoords
▸ decodePlanet(rawLocationId
, rawPlanet
): Planet
Converts data obtained from a contract call (typed with Typechain) into a
Planet
that can be used by the client (see @dfares/types). Note
that some Planet
fields (1) store client data that the blockchain is not
aware of, such as unconfirmedDepartures
, (2) store derived data that is
calculated later by the client, such as silverSpent
and bonus
, or (3)
store data which must be added later from the results of additional contract
calls, such as coordsRevealed
and heldArtifactIds
. Therefore this
function may not be very useful to you outside of the specific context of the
provided Dark Forest web client.
Name | Type | Description |
---|---|---|
rawLocationId |
string |
string of decimal digits representing a number equal to a planet's ID |
rawPlanet |
[string , BigNumber , BigNumber , BigNumber , BigNumber , BigNumber , BigNumber , BigNumber , BigNumber , BigNumber ] & { adminProtect : boolean ; burnOperator : string ; burnStartTimestamp : BigNumber ; canShow : boolean ; capturer : string ; createdAt : BigNumber ; defense : BigNumber ; destroyed : boolean ; energyGroDoublers : BigNumber ; frozen : boolean ; hasTriedFindingArtifact : boolean ; hatLevel : BigNumber ; hatType : BigNumber ; invadeStartBlock : BigNumber ; invader : string ; isHomePlanet : boolean ; isInitialized : boolean ; kardashevOperator : string ; kardashevTimestamp : BigNumber ; lastUpdated : BigNumber ; locationId : BigNumber ; owner : string ; pausers : BigNumber ; perlin : BigNumber ; pinkOperator : string ; planetLevel : BigNumber ; planetType : number ; population : BigNumber ; populationCap : BigNumber ; populationGrowth : BigNumber ; prospectedBlockNumber : BigNumber ; range : BigNumber ; silver : BigNumber ; silverCap : BigNumber ; silverGroDoublers : BigNumber ; silverGrowth : BigNumber ; spaceJunk : BigNumber ; spaceType : number ; speed : BigNumber ; upgradeState0 : BigNumber ; upgradeState1 : BigNumber ; upgradeState2 : BigNumber } |
typechain-typed result of a call returning a PlanetTypes.Planet
|
Planet
▸ decodePlanetDefaults(rawDefaults
): PlanetDefaults
Converts the raw typechain result of a call which fetches a
PlanetTypes.PlanetDefaultStats[]
array of structs, and converts it into
an object with type PlanetDefaults
(see @dfares/types).
Name | Type | Description |
---|---|---|
rawDefaults |
[string , BigNumber , BigNumber , BigNumber , BigNumber , BigNumber , BigNumber , BigNumber , BigNumber ] & { barbarianPercentage : BigNumber ; defense : BigNumber ; label : string ; populationCap : BigNumber ; populationGrowth : BigNumber ; range : BigNumber ; silverCap : BigNumber ; silverGrowth : BigNumber ; speed : BigNumber }[] |
result of a ethers.js contract call which returns a raw PlanetTypes.PlanetDefaultStats struct, typed with typechain. |
PlanetDefaults
▸ decodePlayer(rawPlayer
): Player
Converts the raw typechain result of a call which fetches a
PlayerTypes.Player
struct, and converts it into an object
with type Player
(see @dfares/types) that can be used by a client.
Name | Type | Description |
---|---|---|
rawPlayer |
[boolean , string , BigNumber , BigNumber , BigNumber , BigNumber , BigNumber , BigNumber , boolean , BigNumber , boolean , BigNumber ] & { activateArtifactAmount : BigNumber ; buyArtifactAmount : BigNumber ; buyPlanetAmount : BigNumber ; buySpaceshipAmount : BigNumber ; claimedReward : boolean ; claimedShips : boolean ; donationAmount : BigNumber ; dropBombAmount : BigNumber ; finalRank : BigNumber ; hatCount : BigNumber ; homePlanetId : BigNumber ; initTimestamp : BigNumber ; isInitialized : boolean ; kardashevAmount : BigNumber ; lastRevealTimestamp : BigNumber ; leaveUnionTimestamp : BigNumber ; moveCount : BigNumber ; pinkAmount : BigNumber ; pinkedAmount : BigNumber ; player : string ; score : BigNumber ; silver : BigNumber ; spaceJunk : BigNumber ; spaceJunkLimit : BigNumber ; unionId : BigNumber } |
result of an ethers.js contract call which returns a raw PlayerTypes.Player struct, typed with typechain. |
Player
▸ decodeRevealedCoords(rawRevealedCoords
): RevealedCoords
Converts the result of a typechain-typed ethers.js contract call returning a
RevealTypes.RevealedCoords
struct into a RevealedCoords
object (see
dfares/types)
Name | Type | Description |
---|---|---|
rawRevealedCoords |
[BigNumber , BigNumber , BigNumber , string ] & { locationId : BigNumber ; revealer : string ; x : BigNumber ; y : BigNumber } |
the result of a typechain-typed ethers.js contract call returning a RevealTypes.RevealedCoords` struct |
RevealedCoords
▸ decodeUnion(rawUnion
): Union
Converts the raw typechain result of a call which fetches a
UnionTypes.Union
struct, and converts it into an object
with type Union
(see @dfares/types) that can be used by a client.
Name | Type | Description |
---|---|---|
rawUnion |
[BigNumber , string , string , BigNumber , string [], string [], string []] & { applicants : string [] ; invitees : string [] ; leader : string ; level : BigNumber ; members : string [] ; name : string ; unionId : BigNumber } |
result of an ethers.js contract call which returns a raw UnionTypes.Union struct, typed with typechain. |
Union
▸ decodeUpgrade(rawUpgrade
): Upgrade
Converts raw data received from a typechain-typed ethers.js contract call
returning a UpgradeTypes.Upgrade
into an Upgrade
object (see
dfares/types)
Name | Type | Description |
---|---|---|
rawUpgrade |
[BigNumber , BigNumber , BigNumber , BigNumber , BigNumber ] & { defMultiplier : BigNumber ; popCapMultiplier : BigNumber ; popGroMultiplier : BigNumber ; rangeMultiplier : BigNumber ; speedMultiplier : BigNumber } |
raw data received from a typechain-typed ethers.js contract call returning a UpgradeTypes.Upgrade
|
Upgrade
▸ decodeUpgradeBranches(rawUpgradeBranches
): UpgradeBranches
Converts the raw return value of an ether.js contract call to
DarkForest.getUpgrades
to a 2D array of Upgrade
s.
Name | Type | Description |
---|---|---|
rawUpgradeBranches |
[[[BigNumber , BigNumber , BigNumber , BigNumber , BigNumber ] & { defMultiplier : BigNumber ; popCapMultiplier : BigNumber ; popGroMultiplier : BigNumber ; rangeMultiplier : BigNumber ; speedMultiplier : BigNumber }, [BigNumber , BigNumber , BigNumber , BigNumber , BigNumber ] & { defMultiplier : BigNumber ; popCapMultiplier : BigNumber ; popGroMultiplier : BigNumber ; rangeMultiplier : BigNumber ; speedMultiplier : BigNumber }, [BigNumber , BigNumber , BigNumber , BigNumber , BigNumber ] & { defMultiplier : BigNumber ; popCapMultiplier : BigNumber ; popGroMultiplier : BigNumber ; rangeMultiplier : BigNumber ; speedMultiplier : BigNumber }, [BigNumber , BigNumber , BigNumber , BigNumber , BigNumber ] & { defMultiplier : BigNumber ; popCapMultiplier : BigNumber ; popGroMultiplier : BigNumber ; rangeMultiplier : BigNumber ; speedMultiplier : BigNumber }], [[BigNumber , BigNumber , BigNumber , BigNumber , BigNumber ] & { defMultiplier : BigNumber ; popCapMultiplier : BigNumber ; popGroMultiplier : BigNumber ; rangeMultiplier : BigNumber ; speedMultiplier : BigNumber }, [BigNumber , BigNumber , BigNumber , BigNumber , BigNumber ] & { defMultiplier : BigNumber ; popCapMultiplier : BigNumber ; popGroMultiplier : BigNumber ; rangeMultiplier : BigNumber ; speedMultiplier : BigNumber }, [BigNumber , BigNumber , BigNumber , BigNumber , BigNumber ] & { defMultiplier : BigNumber ; popCapMultiplier : BigNumber ; popGroMultiplier : BigNumber ; rangeMultiplier : BigNumber ; speedMultiplier : BigNumber }, [BigNumber , BigNumber , BigNumber , BigNumber , BigNumber ] & { defMultiplier : BigNumber ; popCapMultiplier : BigNumber ; popGroMultiplier : BigNumber ; rangeMultiplier : BigNumber ; speedMultiplier : BigNumber }], [[BigNumber , BigNumber , BigNumber , BigNumber , BigNumber ] & { defMultiplier : BigNumber ; popCapMultiplier : BigNumber ; popGroMultiplier : BigNumber ; rangeMultiplier : BigNumber ; speedMultiplier : BigNumber }, [BigNumber , BigNumber , BigNumber , BigNumber , BigNumber ] & { defMultiplier : BigNumber ; popCapMultiplier : BigNumber ; popGroMultiplier : BigNumber ; rangeMultiplier : BigNumber ; speedMultiplier : BigNumber }, [BigNumber , BigNumber , BigNumber , BigNumber , BigNumber ] & { defMultiplier : BigNumber ; popCapMultiplier : BigNumber ; popGroMultiplier : BigNumber ; rangeMultiplier : BigNumber ; speedMultiplier : BigNumber }, [BigNumber , BigNumber , BigNumber , BigNumber , BigNumber ] & { defMultiplier : BigNumber ; popCapMultiplier : BigNumber ; popGroMultiplier : BigNumber ; rangeMultiplier : BigNumber ; speedMultiplier : BigNumber }]] |
raw return value of ether.js contract call to DarkForest.getUpgrades
|
UpgradeBranches
▸ hashToInt(hash
): number
Name | Type |
---|---|
hash |
string |
number
▸ isNetworkEvent(event
): event is NetworkEvent
Returns whether or not the given event is an instance of {@link NetworkEvent}. Not super stringent but works for now.
Name | Type |
---|---|
event |
any |
event is NetworkEvent
▸ isUnconfirmedAcceptApplication(txIntent
): txIntent is UnconfirmedAcceptApplication
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedAcceptApplication
▸ isUnconfirmedAcceptApplicationTx(tx
): tx is Transaction<UnconfirmedAcceptApplication>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedAcceptApplication>
▸ isUnconfirmedAcceptInvite(txIntent
): txIntent is UnconfirmedAcceptInvite
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedAcceptInvite
▸ isUnconfirmedAcceptInviteTx(tx
): tx is Transaction<UnconfirmedAcceptInvite>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedAcceptInvite>
▸ isUnconfirmedActivateArtifact(txIntent
): txIntent is UnconfirmedActivateArtifact
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedActivateArtifact
▸ isUnconfirmedActivateArtifactTx(tx
): tx is Transaction<UnconfirmedActivateArtifact>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedActivateArtifact>
▸ isUnconfirmedAddMemberByAdmin(txIntent
): txIntent is UnconfirmedAddMemberByAdmin
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedAddMemberByAdmin
▸ isUnconfirmedAddMemberByAdminTx(tx
): tx is Transaction<UnconfirmedAddMemberByAdmin>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedAddMemberByAdmin>
▸ isUnconfirmedBlue(txIntent
): txIntent is UnconfirmedBlue
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedBlue
▸ isUnconfirmedBlueTx(tx
): tx is Transaction<UnconfirmedBlue>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedBlue>
▸ isUnconfirmedBurn(txIntent
): txIntent is UnconfirmedBurn
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedBurn
▸ isUnconfirmedBurnTx(tx
): tx is Transaction<UnconfirmedBurn>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedBurn>
▸ isUnconfirmedBuyArtifact(txIntent
): txIntent is UnconfirmedBuyArtifact
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedBuyArtifact
▸ isUnconfirmedBuyArtifactTx(tx
): tx is Transaction<UnconfirmedBuyArtifact>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedBuyArtifact>
▸ isUnconfirmedBuyHat(txIntent
): txIntent is UnconfirmedBuyHat
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedBuyHat
▸ isUnconfirmedBuyHatTx(tx
): tx is Transaction<UnconfirmedBuyHat>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedBuyHat>
▸ isUnconfirmedBuyPlanet(txIntent
): txIntent is UnconfirmedBuyPlanet
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedBuyPlanet
▸ isUnconfirmedBuyPlanetTx(tx
): tx is Transaction<UnconfirmedBuyPlanet>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedBuyPlanet>
▸ isUnconfirmedBuySpaceship(txIntent
): txIntent is UnconfirmedBuySpaceship
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedBuySpaceship
▸ isUnconfirmedBuySpaceshipTx(tx
): tx is Transaction<UnconfirmedBuySpaceship>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedBuySpaceship>
▸ isUnconfirmedCancelApplication(txIntent
): txIntent is UnconfirmedCancelApplication
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedCancelApplication
▸ isUnconfirmedCancelApplicationTx(tx
): tx is Transaction<UnconfirmedCancelApplication>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedCancelApplication>
▸ isUnconfirmedCancelInvite(txIntent
): txIntent is UnconfirmedCancelInvite
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedCancelInvite
▸ isUnconfirmedCancelInviteTx(tx
): tx is Transaction<UnconfirmedCancelInvite>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedCancelInvite>
▸ isUnconfirmedCapturePlanet(txIntent
): txIntent is UnconfirmedCapturePlanet
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedCapturePlanet
▸ isUnconfirmedCapturePlanetTx(tx
): tx is Transaction<UnconfirmedCapturePlanet>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedCapturePlanet>
▸ isUnconfirmedChangeArtifactImageType(txIntent
): txIntent is UnconfirmedChangeArtifactImageType
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedChangeArtifactImageType
▸ isUnconfirmedChangeArtifactImageTypeTx(tx
): tx is Transaction<UnconfirmedDeactivateArtifact>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedDeactivateArtifact>
▸ isUnconfirmedChangeUnionName(txIntent
): txIntent is UnconfirmedChangeUnionName
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedChangeUnionName
▸ isUnconfirmedChangeUnionNameTx(tx
): tx is Transaction<UnconfirmedChangeUnionName>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedChangeUnionName>
▸ isUnconfirmedClaim(txIntent
): txIntent is UnconfirmedClaim
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedClaim
▸ isUnconfirmedClaimTx(tx
): tx is Transaction<UnconfirmedReveal>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedReveal>
▸ isUnconfirmedCreateUnion(txIntent
): txIntent is UnconfirmedCreateUnion
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedCreateUnion
▸ isUnconfirmedCreateUnionTx(tx
): tx is Transaction<UnconfirmedCreateUnion>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedCreateUnion>
▸ isUnconfirmedDeactivateArtifact(txIntent
): txIntent is UnconfirmedDeactivateArtifact
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedDeactivateArtifact
▸ isUnconfirmedDeactivateArtifactTx(tx
): tx is Transaction<UnconfirmedDeactivateArtifact>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedDeactivateArtifact>
▸ isUnconfirmedDepositArtifact(txIntent
): txIntent is UnconfirmedDepositArtifact
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedDepositArtifact
▸ isUnconfirmedDepositArtifactTx(tx
): tx is Transaction<UnconfirmedDepositArtifact>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedDepositArtifact>
▸ isUnconfirmedDisbandUnion(txIntent
): txIntent is UnconfirmedDisbandUnion
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedDisbandUnion
▸ isUnconfirmedDisbandUnionTx(tx
): tx is Transaction<UnconfirmedDisbandUnion>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedDisbandUnion>
▸ isUnconfirmedDonate(txIntent
): txIntent is UnconfirmedDonate
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedDonate
▸ isUnconfirmedDonateTx(tx
): tx is Transaction<UnconfirmedDonate>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedDonate>
▸ isUnconfirmedFindArtifact(txIntent
): txIntent is UnconfirmedFindArtifact
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedFindArtifact
▸ isUnconfirmedFindArtifactTx(tx
): tx is Transaction<UnconfirmedFindArtifact>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedFindArtifact>
▸ isUnconfirmedGetShips(txIntent
): txIntent is UnconfirmedGetShips
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedGetShips
▸ isUnconfirmedGetShipsTx(tx
): tx is Transaction<UnconfirmedGetShips>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedGetShips>
▸ isUnconfirmedInit(txIntent
): txIntent is UnconfirmedInit
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedInit
▸ isUnconfirmedInitTx(tx
): tx is Transaction<UnconfirmedInit>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedInit>
▸ isUnconfirmedInvadePlanet(txIntent
): txIntent is UnconfirmedInvadePlanet
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedInvadePlanet
▸ isUnconfirmedInvadePlanetTx(tx
): tx is Transaction<UnconfirmedInvadePlanet>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedInvadePlanet>
▸ isUnconfirmedInviteMember(txIntent
): txIntent is UnconfirmedInviteMember
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedInviteMember
▸ isUnconfirmedInviteMemberTx(tx
): tx is Transaction<UnconfirmedInviteMember>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedInviteMember>
▸ isUnconfirmedKardashev(txIntent
): txIntent is UnconfirmedKardashev
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedKardashev
▸ isUnconfirmedKardashevTx(tx
): tx is Transaction<UnconfirmedKardashev>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedKardashev>
▸ isUnconfirmedKickMember(txIntent
): txIntent is UnconfirmedKickMember
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedKickMember
▸ isUnconfirmedKickMemberTx(tx
): tx is Transaction<UnconfirmedKickMember>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedKickMember>
▸ isUnconfirmedLeaveUnion(txIntent
): txIntent is UnconfirmedLeaveUnion
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedLeaveUnion
▸ isUnconfirmedLeaveUnionTx(tx
): tx is Transaction<UnconfirmedLeaveUnion>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedLeaveUnion>
▸ isUnconfirmedLevelUpUnion(txIntent
): txIntent is UnconfirmedLevelUpUnion
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedLevelUpUnion
▸ isUnconfirmedLevelUpUnionTx(tx
): tx is Transaction<UnconfirmedLevelUpUnion>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedLevelUpUnion>
▸ isUnconfirmedMove(txIntent
): txIntent is UnconfirmedMove
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedMove
▸ isUnconfirmedMoveTx(tx
): tx is Transaction<UnconfirmedMove>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedMove>
▸ isUnconfirmedPink(txIntent
): txIntent is UnconfirmedPink
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedPink
▸ isUnconfirmedPinkTx(tx
): tx is Transaction<UnconfirmedPink>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedPink>
▸ isUnconfirmedProspectPlanet(txIntent
): txIntent is UnconfirmedProspectPlanet
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedProspectPlanet
▸ isUnconfirmedProspectPlanetTx(tx
): tx is Transaction<UnconfirmedProspectPlanet>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedProspectPlanet>
▸ isUnconfirmedRefreshPlanet(txIntent
): txIntent is UnconfirmedRefreshPlanet
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedRefreshPlanet
▸ isUnconfirmedRefreshPlanetTx(tx
): tx is Transaction<UnconfirmedRefreshPlanet>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedRefreshPlanet>
▸ isUnconfirmedRejectApplication(txIntent
): txIntent is UnconfirmedCancelApplication
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedCancelApplication
▸ isUnconfirmedRejectApplicationTx(tx
): tx is Transaction<UnconfirmedRejectApplication>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedRejectApplication>
▸ isUnconfirmedRelease(txIntent
): txIntent is UnconfirmedMove
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedMove
▸ isUnconfirmedReleaseTx(tx
): tx is Transaction<UnconfirmedMove>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedMove>
▸ isUnconfirmedReveal(txIntent
): txIntent is UnconfirmedReveal
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedReveal
▸ isUnconfirmedRevealTx(tx
): tx is Transaction<UnconfirmedReveal>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedReveal>
▸ isUnconfirmedSendApplication(txIntent
): txIntent is UnconfirmedSendApplication
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedSendApplication
▸ isUnconfirmedSendApplicationTx(tx
): tx is Transaction<UnconfirmedSendApplication>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedSendApplication>
▸ isUnconfirmedTransfer(txIntent
): txIntent is UnconfirmedPlanetTransfer
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedPlanetTransfer
▸ isUnconfirmedTransferLeaderRole(txIntent
): txIntent is UnconfirmedTransferLeaderRole
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedTransferLeaderRole
▸ isUnconfirmedTransferLeaderRoleTx(tx
): tx is Transaction<UnconfirmedTransferLeaderRole>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedTransferLeaderRole>
▸ isUnconfirmedTransferTx(tx
): tx is Transaction<UnconfirmedPlanetTransfer>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedPlanetTransfer>
▸ isUnconfirmedUpgrade(txIntent
): txIntent is UnconfirmedUpgrade
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedUpgrade
▸ isUnconfirmedUpgradeTx(tx
): tx is Transaction<UnconfirmedUpgrade>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedUpgrade>
▸ isUnconfirmedUseKey(txIntent
): txIntent is UnconfirmedUseKey
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedUseKey
▸ isUnconfirmedUseKeyTx(tx
): tx is Transaction<UnconfirmedUseKey>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedUseKey>
▸ isUnconfirmedWithdrawArtifact(txIntent
): txIntent is UnconfirmedWithdrawArtifact
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedWithdrawArtifact
▸ isUnconfirmedWithdrawArtifactTx(tx
): tx is Transaction<UnconfirmedWithdrawArtifact>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedWithdrawArtifact>
▸ isUnconfirmedWithdrawSilver(txIntent
): txIntent is UnconfirmedWithdrawSilver
Name | Type |
---|---|
txIntent |
TxIntent |
txIntent is UnconfirmedWithdrawSilver
▸ isUnconfirmedWithdrawSilverTx(tx
): tx is Transaction<UnconfirmedWithdrawSilver>
Name | Type |
---|---|
tx |
Transaction <TxIntent > |
tx is Transaction<UnconfirmedWithdrawSilver>
▸ locationIdFromBigInt(location
): LocationId
Converts a BigInteger representation of location ID into a LocationID: a
non-0x-prefixed all lowercase hex string of exactly 64 hex characters
(0-padded). LocationIDs should only be instantiated through
locationIdFromHexStr
, locationIdFromDecStr
, locationIdFromBigInt
, and
locationIdFromEthersBN
.
Name | Type | Description |
---|---|---|
location |
BigInteger |
BigInteger representation of a location ID. |
LocationId
▸ locationIdFromDecStr(location
): LocationId
Converts a string representing a decimal number into a LocationID: a
non-0x-prefixed all lowercase hex string of exactly 64 hex characters
(0-padded if necessary). LocationIDs should only be instantiated through
locationIdFromHexStr
, locationIdFromDecStr
, locationIdFromBigInt
, and
locationIdFromEthersBN
.
Name | Type | Description |
---|---|---|
location |
string |
string of decimal digits, the base 10 representation of a location ID. |
LocationId
▸ locationIdFromEthersBN(location
): LocationId
Converts an ethers.js BigNumber (type aliased here as EthersBN
)
representation of a location ID into a LocationID: a non-0x-prefixed all
lowercase hex string of exactly 64 hex characters (0-padded). LocationIDs
should only be instantiated through locationIdFromHexStr
,
locationIdFromDecStr
, locationIdFromBigInt
, and locationIdFromEthersBN
.
Name | Type | Description |
---|---|---|
location |
BigNumber |
ethers.js BigNumber representation of a locationID. |
LocationId
▸ locationIdFromHexStr(location
): LocationId
Converts a possibly 0x-prefixed string of hex digits to a LocationId
: a
non-0x-prefixed all lowercase hex string of exactly 64 hex characters
(0-padded if necessary). LocationIDs should only be instantiated through
locationIdFromHexStr
, locationIdFromDecStr
, locationIdFromBigInt
, and
locationIdFromEthersBN
.
Name | Type | Description |
---|---|---|
location |
string |
A possibly 0x-prefixed string of hex digits representing a location ID. |
LocationId
▸ locationIdToDecStr(locationId
): string
Converts a LocationID to a decimal string with the same numerical value; can be used if you need to pass an artifact ID into a web3 call.
Name | Type | Description |
---|---|---|
locationId |
LocationId |
LocationID to convert into a string of decimal digits |
string