Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RollerRPCAPI

Hierarchy

  • RollerRPCAPI

Index

Constructors

constructor

Properties

adopt

adopt: Adopt = ...

Adopt ship

cancelEscape

cancelEscape: CancelEscape = ...

Cancel request to escape

cancelTransaction

cancelTransaction: CancelTransaction = ...

Cancels a transaction that hasn't been sent out

configureKeys

configureKeys: ConfigureKeys = ...

Configure Keys

detach

detach: Detach = ...

Detach ship

escape

escape: Escape = ...

Request escaping to a different sponsor

getAllPending

getAllPending: GetAllPending = ...

Gets all pending transactions in the roller

getAllowance

getAllowance: GetAllowance = ...

Retrieves number of L2 transactions this ship is allowed to send to the Roller, per time slice

getDns

getDns: GetDns = ...

Naive Rollup DNSs

getHistory

getHistory: GetHistory = ...

Returns status, hash and type of all L2 tx submitted by an ethereum address,

getManagerFor

getManagerFor: GetManagerFor = ...

Returns all the ships controlled by an ethereum address as manage proxy

getNaiveState

getNaiveState: GetNaiveState = ...

Naive State

getNonce

getNonce: GetNonce = ...

Latest nonce (counting pending transactions) for the proxy of the given ship

getOwnedPoints

getOwnedPoints: GetOwnedPoints = ...

Returns all the ships controlled by an ethereum address as owner proxy

getPendingByAddress

getPendingByAddress: GetPendingByAddress = ...

Gets all pending transactions in the roller, by address

getPendingByShip

getPendingByShip: GetPendingByShip = ...

Gets all pending transactions in the roller, by ship

getPendingTx

getPendingTx: GetPendingTx = ...

Gets the pending transaction in the roller that corresponds to the given hash

getPoint

getPoint: GetPoint = ...

Retrieves Azimuth Point data for a specific ship

getPredictedState

getPredictedState: GetPredictedState = ...

Predicted Naive State

getRemainingQuota

getRemainingQuota: GetRemainingQuota = ...

Retrieves current number of L2 transactions this ship is allowed to send to the Roller

getRollerConfig

getRollerConfig: GetRollerConfig = ...

Returns configuration parameters of the Roller

getShips

getShips: GetShips = ...

Returns all the ships controlled by an ethereum address

getSpawned

getSpawned: GetSpawned = ...

Gets all spawned points by a star or galaxy

getSpawningFor

getSpawningFor: GetSpawningFor = ...

Returns all the ships controlled by an ethereum address as spawn proxy

getSponsoredPoints

getSponsoredPoints: GetSponsoredPoints = ...

Retrieves sponsees of the given ship, together with a list of points requesting to be sponsored

getTransactionStatus

getTransactionStatus: GetTransactionStatus = ...

Status of an L2 transaction submitted to the Roller

getTransferringFor

getTransferringFor: GetTransferringFor = ...

Returns all the ships controlled by an ethereum address as transfer proxy

getUnsignedTx

getUnsignedTx: GetUnsignedTx = ...

Returns a hash of the unsigned L2 transaction, following the format found at https://urbit.org/docs/azimuth/l2/bytestring#unsigned

getUnspawned

getUnspawned: GetUnspawned = ...

Gets all points that haven't been spawned by a star or galaxy

getVotingFor

getVotingFor: GetVotingFor = ...

Returns all the ships controlled by an ethereum address as voting proxy

hashRawTransaction

hashRawTransaction: HashRawTransaction = ...

Returns the hash of the serialized signature and raw bytes of the l2 tx. Used as unique identifier of a tx submitted to a L2 roller

hashTransaction

hashTransaction: HashTransaction = ...

DEPRECATED: Currently equivalent to prepareForSigning.

prepareForSigning

prepareForSigning: PrepareForSigning = ...

Returns a serialized L2 transaction, with the appropiate headers, and reversed endianness. Useful to be used together with, for example, Metamask personal_sign method

reject

reject: Reject = ...

Reject ship

rpc

rpc: Client

setManagementProxy

setManagementProxy: SetManagementProxy = ...

Set Management Proxy

setSpawnProxy

setSpawnProxy: SetSpawnProxy = ...

Set Spawn Proxy

setTransferProxy

setTransferProxy: SetTransferProxy = ...

Set Transfer Proxy

spawn

spawn: Spawn = ...

Spawns a ship to an Ethereum Address

spawnsRemaining

spawnsRemaining: SpawnsRemaining = ...

Returns the number of points that haven't been spawned by a star or galaxy

transferPoint

transferPoint: TransferPoint = ...

Transfers a point to an ethereum address

transport

transport: HTTPTransport | WebSocketTransport | PostMessageTransport | PostMessageIframeTransport

whenNextBatch

whenNextBatch: WhenNextBatch = ...

Timestamp of when the next L2 batch will be submitted

whenNextSlice

whenNextSlice: WhenNextSlice = ...

Timestamp of when the quota for submitting L2 transactions will be reset

Static openrpcDocument

openrpcDocument: OpenrpcDocument = ...

Methods

onError

  • onError(callback: (data: JSONRPCError) => void): void
  • Adds an optional JSONRPCError handler to handle receiving errors that cannot be resolved to a specific request

    example

    myClient.onError((err: JSONRPCError)=>console.log(err.message));

    Parameters

    • callback: (data: JSONRPCError) => void
        • (data: JSONRPCError): void
        • Parameters

          • data: JSONRPCError

          Returns void

    Returns void

onNotification

  • onNotification(callback: (data: any) => void): void
  • Adds a JSONRPC notification handler to handle receiving notifications.

    example

    myClient.onNotification((data)=>console.log(data));

    Parameters

    • callback: (data: any) => void
        • (data: any): void
        • Parameters

          • data: any

          Returns void

    Returns void

setDefaultTimeout

  • setDefaultTimeout(ms?: number): void
  • Sets a default timeout in ms for all requests excluding notifications.

    example

    // 20s timeout myClient.setDefaultTimeout(20000); // Removes timeout from request myClient.setDefaultTimeout(undefined);

    Parameters

    • Optional ms: number

    Returns void

startBatch

  • startBatch(): void
  • Initiates RollerRPCAPI.startBatch in order to build a batch call.

    Subsequent calls to [[RollerRPCAPI.request]] will be added to the batch. Once RollerRPCAPI.stopBatch is called, the promises for the [[RollerRPCAPI.request]] will then be resolved. If there is already a batch in progress this method is a noop.

    example

    myClient.startBatch(); myClient.foo().then(() => console.log("foobar")) myClient.bar().then(() => console.log("foobarbaz")) myClient.stopBatch();

    Returns void

stopBatch

  • stopBatch(): void
  • Initiates [[Client.stopBatch]] in order to finalize and send the batch to the underlying transport.

    stopBatch will send the RollerRPCAPI calls made since the last RollerRPCAPI.startBatch call. For that reason, RollerRPCAPI.startBatch MUST be called before RollerRPCAPI.stopBatch.

    example

    myClient.startBatch(); myClient.foo().then(() => console.log("foobar")) myClient.bar().then(() => console.log("foobarbaz")) myClient.stopBatch();

    Returns void