@gala-chain/connect ∙ API
API > GalaChainBaseApi
Class: GalaChainBaseApi
Base API class providing common chaincode operations. Serves as the foundation for specific API implementations.
Contents
- Extended By
- Constructors
- new GalaChainBaseApi(chainCodeUrl, connection)
- Properties
- chainCodeUrl
- connection
- Methods
- DryRun()
- GetObjectByKey()
- GetObjectHistory()
Extended By
Constructors
new GalaChainBaseApi(chainCodeUrl, connection)
new GalaChainBaseApi(
chainCodeUrl,connection):GalaChainBaseApi
Creates a new base API instance.
Parameters
▪ chainCodeUrl: string
The URL of the chaincode service
▪ connection: GalaChainProvider
The GalaChain provider for network communication
Source
chain-connect/src/chainApis/GalaChainBaseApi.ts:30
Properties
chainCodeUrl
protectedchainCodeUrl:string
The URL of the chaincode service
Source
chain-connect/src/chainApis/GalaChainBaseApi.ts:31
connection
protectedconnection:GalaChainProvider
The GalaChain provider for network communication
Source
chain-connect/src/chainApis/GalaChainBaseApi.ts:32
Methods
DryRun()
DryRun(
dto):Promise\<GalaChainResponseSuccess\<DryRunResult>>
Performs a dry run of a chaincode operation without committing to the ledger.
Parameters
▪ dto: PublicProperties\<ConstructorArgs\<DryRunDto>>
The dry run request parameters
Returns
Promise resolving to the dry run results
Source
chain-connect/src/chainApis/GalaChainBaseApi.ts:40
GetObjectByKey()
GetObjectByKey\<
T>(dto):Promise\<GalaChainResponseSuccess\<T>>
Retrieves an object from the blockchain by its key.
Type parameters
▪ T = Record\<string, unknown>
The expected type of the retrieved object
Parameters
▪ dto: PublicProperties\<ConstructorArgs\<GetObjectDto>>
The object key request parameters
Returns
Promise resolving to the retrieved object
Source
chain-connect/src/chainApis/GalaChainBaseApi.ts:61
GetObjectHistory()
GetObjectHistory\<
T>(dto):Promise\<GalaChainResponseSuccess\<T>>
Retrieves the history of changes for an object from the blockchain.
Type parameters
▪ T = Record\<string, unknown>
The expected type of the historical objects
Parameters
▪ dto: PublicProperties\<ConstructorArgs\<GetObjectHistoryDto>>
The object history request parameters
Returns
Promise resolving to the object's history