66
77import {
88 type Hex ,
9- type GolemBaseCreate ,
10- type GolemBaseUpdate ,
11- type GolemBaseExtend ,
9+ type GolemDBCreate ,
10+ type GolemDBUpdate ,
11+ type GolemDBExtend ,
1212 type EntityMetaData ,
1313 type AccountData ,
1414 golemBaseABI ,
@@ -52,17 +52,17 @@ interface GenericClient<Internal> {
5252 getRawClient ( ) : Internal
5353
5454 /**
55- * Get the total count of entities in GolemBase
55+ * Get the total count of entities in GolemDB
5656 */
5757 getEntityCount ( ) : Promise < number >
5858
5959 /**
60- * Get the entity keys of all entities in GolemBase
60+ * Get the entity keys of all entities in GolemDB
6161 */
6262 getAllEntityKeys ( ) : Promise < Hex [ ] >
6363
6464 /**
65- * Get the entity keys of all entities in GolemBase owned by the given address
65+ * Get the entity keys of all entities in GolemDB owned by the given address
6666 *
6767 * @returns Array of the entity keys
6868 */
@@ -78,7 +78,7 @@ interface GenericClient<Internal> {
7878 getStorageValue ( key : Hex ) : Promise < Uint8Array >
7979
8080 /**
81- * Query entities in GolemBase based on annotations
81+ * Query entities in GolemDB based on annotations
8282 *
8383 * @param query - The query to look up entities with
8484 *
@@ -105,7 +105,7 @@ interface GenericClient<Internal> {
105105 getEntityMetaData ( key : Hex ) : Promise < EntityMetaData >
106106
107107 /**
108- * Install callbacks that will be invoked for every GolemBase transaction
108+ * Install callbacks that will be invoked for every GolemDB transaction
109109 *
110110 * @param args.fromBlock - The starting block, events trigger the callbacks starting from this block
111111 * @param args.onCreated - A callback that's invoked whenever entities are created
@@ -131,9 +131,9 @@ interface GenericClient<Internal> {
131131 } ) : ( ) => void
132132}
133133
134- export interface GolemBaseROClient extends GenericClient < internal . GolemBaseROClient > { }
134+ export interface GolemDBROClient extends GenericClient < internal . GolemDBROClient > { }
135135
136- export interface GolemBaseClient extends GenericClient < internal . GolemBaseClient > {
136+ export interface GolemDBClient extends GenericClient < internal . GolemDBClient > {
137137 /**
138138 * Get the ethereum address of the owner of the ethereum account used by this client
139139 */
@@ -149,10 +149,10 @@ export interface GolemBaseClient extends GenericClient<internal.GolemBaseClient>
149149 * @param args.maxPriorityFeePerGas - Sets the max priority fee per gas manually
150150 */
151151 sendTransaction (
152- creates ?: GolemBaseCreate [ ] ,
153- updates ?: GolemBaseUpdate [ ] ,
152+ creates ?: GolemDBCreate [ ] ,
153+ updates ?: GolemDBUpdate [ ] ,
154154 deletes ?: Hex [ ] ,
155- extensions ?: GolemBaseExtend [ ] ,
155+ extensions ?: GolemDBExtend [ ] ,
156156 args ?: {
157157 txHashCallback ?: ( txHash : Hex ) => void ,
158158 gas ?: bigint ,
@@ -167,7 +167,7 @@ export interface GolemBaseClient extends GenericClient<internal.GolemBaseClient>
167167 } >
168168
169169 /**
170- * Create one or more new entities in GolemBase
170+ * Create one or more new entities in GolemDB
171171 *
172172 * @param creates - The entities to create
173173 * @param args - Optional parameters, see {@link sendTransaction}
@@ -176,7 +176,7 @@ export interface GolemBaseClient extends GenericClient<internal.GolemBaseClient>
176176 * together with the number of the block at which they will expire
177177 */
178178 createEntities (
179- creates : GolemBaseCreate [ ] ,
179+ creates : GolemDBCreate [ ] ,
180180 args ?: {
181181 txHashCallback ?: ( txHash : Hex ) => void ,
182182 gas ?: bigint ,
@@ -186,7 +186,7 @@ export interface GolemBaseClient extends GenericClient<internal.GolemBaseClient>
186186 ) : Promise < CreateEntityReceipt [ ] >
187187
188188 /**
189- * Update one or more new entities in GolemBase
189+ * Update one or more new entities in GolemDB
190190 *
191191 * @param updates - The entities to update
192192 * @param args - Optional parameters, see {@link sendTransaction}
@@ -195,7 +195,7 @@ export interface GolemBaseClient extends GenericClient<internal.GolemBaseClient>
195195 * together with the number of the block at which they will expire
196196 */
197197 updateEntities (
198- updates : GolemBaseUpdate [ ] ,
198+ updates : GolemDBUpdate [ ] ,
199199 args ?: {
200200 txHashCallback ?: ( txHash : Hex ) => void ,
201201 gas ?: bigint ,
@@ -205,7 +205,7 @@ export interface GolemBaseClient extends GenericClient<internal.GolemBaseClient>
205205 ) : Promise < UpdateEntityReceipt [ ] >
206206
207207 /**
208- * Delete one or more new entities in GolemBase
208+ * Delete one or more new entities in GolemDB
209209 *
210210 * @param deletes - The entity keys of the entities to delete
211211 * @param args - Optional parameters, see {@link sendTransaction}
@@ -223,7 +223,7 @@ export interface GolemBaseClient extends GenericClient<internal.GolemBaseClient>
223223 ) : Promise < DeleteEntityReceipt [ ] >
224224
225225 /**
226- * Extend the BTL of one or more new entities in GolemBase
226+ * Extend the BTL of one or more new entities in GolemDB
227227 *
228228 * @param extensions - The entities to extend the BTL of
229229 * @param args - Optional parameters, see {@link sendTransaction}
@@ -233,7 +233,7 @@ export interface GolemBaseClient extends GenericClient<internal.GolemBaseClient>
233233 * entities expire
234234 */
235235 extendEntities (
236- extensions : GolemBaseExtend [ ] ,
236+ extensions : GolemDBExtend [ ] ,
237237 args ?: {
238238 txHashCallback ?: ( txHash : Hex ) => void ,
239239 gas ?: bigint ,
@@ -321,7 +321,7 @@ function parseTransactionLogs(
321321 )
322322}
323323
324- function createGenericClient < Internal extends internal . GolemBaseROClient > (
324+ function createGenericClient < Internal extends internal . GolemDBROClient > (
325325 client : Internal ,
326326 logger : Logger < ILogObj >
327327) : GenericClient < Internal > {
@@ -413,7 +413,7 @@ function createGenericClient<Internal extends internal.GolemBaseROClient>(
413413}
414414
415415/**
416- * Create a read-only client to interact with GolemBase
416+ * Create a read-only client to interact with GolemDB
417417 * @param chainId - The ID of the chain you are connecting to
418418 * @param rpcUrl - JSON-RPC URL to talk to
419419 * @param wsUrl - WebSocket URL to talk to
@@ -429,20 +429,20 @@ export function createROClient(
429429 type : "hidden" ,
430430 hideLogPositionForProduction : true ,
431431 } )
432- ) : GolemBaseROClient {
432+ ) : GolemDBROClient {
433433 const iClient = internal . createROClient ( chainId , rpcUrl , wsUrl , logger )
434434 const baseClient = createGenericClient ( iClient , logger )
435435
436436 return {
437437 ...baseClient ,
438- getRawClient ( ) : internal . GolemBaseROClient {
438+ getRawClient ( ) : internal . GolemDBROClient {
439439 return iClient
440440 } ,
441441 }
442442}
443443
444444/**
445- * Create a client to interact with GolemBase
445+ * Create a client to interact with GolemDB
446446 * @param chainId - The ID of the chain you are connecting to
447447 * @param accountData - Either a private key or a wallet provider for the user's account
448448 * @param rpcUrl - JSON-RPC URL to talk to
@@ -460,7 +460,7 @@ export async function createClient(
460460 type : "hidden" ,
461461 hideLogPositionForProduction : true ,
462462 } )
463- ) : Promise < GolemBaseClient > {
463+ ) : Promise < GolemDBClient > {
464464
465465 const iClient = await internal . createClient ( chainId , accountData , rpcUrl , wsUrl , logger )
466466 const baseClient = createGenericClient ( iClient , logger )
@@ -479,11 +479,11 @@ export async function createClient(
479479 } ,
480480
481481 async sendTransaction (
482- this : GolemBaseClient ,
483- creates : GolemBaseCreate [ ] = [ ] ,
484- updates : GolemBaseUpdate [ ] = [ ] ,
482+ this : GolemDBClient ,
483+ creates : GolemDBCreate [ ] = [ ] ,
484+ updates : GolemDBUpdate [ ] = [ ] ,
485485 deletes : Hex [ ] = [ ] ,
486- extensions : GolemBaseExtend [ ] = [ ] ,
486+ extensions : GolemDBExtend [ ] = [ ] ,
487487 args : {
488488 txHashCallback ?: ( txHash : Hex ) => void ,
489489 gas ?: bigint ,
@@ -496,7 +496,7 @@ export async function createClient(
496496 deleteEntitiesReceipts : DeleteEntityReceipt [ ] ,
497497 extendEntitiesReceipts : ExtendEntityReceipt [ ] ,
498498 } > {
499- const receipt = await iClient . walletClient . sendGolemBaseTransactionAndWaitForReceipt (
499+ const receipt = await iClient . walletClient . sendGolemDBTransactionAndWaitForReceipt (
500500 creates , updates , deletes , extensions , args
501501 )
502502 log . debug ( "Got receipt:" , receipt )
@@ -507,8 +507,8 @@ export async function createClient(
507507 } ,
508508
509509 async createEntities (
510- this : GolemBaseClient ,
511- creates : GolemBaseCreate [ ] ,
510+ this : GolemDBClient ,
511+ creates : GolemDBCreate [ ] ,
512512 args : {
513513 txHashCallback ?: ( txHash : Hex ) => void ,
514514 gas ?: bigint ,
@@ -522,8 +522,8 @@ export async function createClient(
522522 } ,
523523
524524 async updateEntities (
525- this : GolemBaseClient ,
526- updates : GolemBaseUpdate [ ] ,
525+ this : GolemDBClient ,
526+ updates : GolemDBUpdate [ ] ,
527527 args : {
528528 txHashCallback ?: ( txHash : Hex ) => void ,
529529 gas ?: bigint ,
@@ -537,7 +537,7 @@ export async function createClient(
537537 } ,
538538
539539 async deleteEntities (
540- this : GolemBaseClient ,
540+ this : GolemDBClient ,
541541 deletes : Hex [ ] ,
542542 args : {
543543 txHashCallback ?: ( txHash : Hex ) => void ,
@@ -552,8 +552,8 @@ export async function createClient(
552552 } ,
553553
554554 async extendEntities (
555- this : GolemBaseClient ,
556- extensions : GolemBaseExtend [ ] ,
555+ this : GolemDBClient ,
556+ extensions : GolemDBExtend [ ] ,
557557 args : {
558558 txHashCallback ?: ( txHash : Hex ) => void ,
559559 gas ?: bigint ,
0 commit comments