Skip to main content

HashedMapTrackerProvider

@opcat-labs/scrypt-ts-opcat v1.0.4


@opcat-labs/scrypt-ts-opcat / HashedMapTrackerProvider

Class: HashedMapTrackerProvider

Defined in: packages/scrypt-ts-opcat/src/smart-contract/builtin-libs/hashedMap/hashedMapProvider.ts:49

Implements

Constructors

new HashedMapTrackerProvider()

new HashedMapTrackerProvider(trackerUrl): HashedMapTrackerProvider

Defined in: packages/scrypt-ts-opcat/src/smart-contract/builtin-libs/hashedMap/hashedMapProvider.ts:56

Parameters

trackerUrl

string

the url of the tracker server

Returns

HashedMapTrackerProvider

Properties

bindUtxoCallback()

static bindUtxoCallback: (hashedmapProvider) => (contract) => Promise\<void>

Defined in: packages/scrypt-ts-opcat/src/smart-contract/builtin-libs/hashedMap/hashedMapProvider.ts:51

Parameters

hashedmapProvider

HashedMapProvider

Returns

Function

Parameters
contract

SmartContract\<any>

Returns

Promise\<void>

Methods

getKeyValues()

getKeyValues(scripthash, stateFieldPath, currentOutpoint): Promise\<{ keyValues: [ByteString, ByteString][]; }>

Defined in: packages/scrypt-ts-opcat/src/smart-contract/builtin-libs/hashedMap/hashedMapProvider.ts:60

Get the key values snapshot of the hashed map instance

Parameters

scripthash

string

stateFieldPath

string

currentOutpoint

Outpoint

Returns

Promise\<{ keyValues: [ByteString, ByteString][]; }>

Implementation of

HashedMapProvider.getKeyValues


getLatestUtxo()

getLatestUtxo(scripthash, stateFieldPath, instanceOutpoint): Promise\<Outpoint & object>

Defined in: packages/scrypt-ts-opcat/src/smart-contract/builtin-libs/hashedMap/hashedMapProvider.ts:70

Get the latest utxo of the hashed map instance

Parameters

scripthash

string

stateFieldPath

string

instanceOutpoint

Outpoint

Returns

Promise\<Outpoint & object>

Implementation of

HashedMapProvider.getLatestUtxo


deserializeKeyValuesResponse()

static deserializeKeyValuesResponse(bytes): [ByteString, ByteString][]

Defined in: packages/scrypt-ts-opcat/src/smart-contract/builtin-libs/hashedMap/hashedMapProvider.ts:151

Parameters

bytes

Uint8Array

Returns

[ByteString, ByteString][]


serializeKeyValuesResponse()

static serializeKeyValuesResponse(keyValues): Uint8Array

Defined in: packages/scrypt-ts-opcat/src/smart-contract/builtin-libs/hashedMap/hashedMapProvider.ts:134

Parameters

keyValues

[ByteString, ByteString][]

Returns

Uint8Array