diff --git a/packages/agent/chain.md b/packages/agent/chain.md index eb4ca00d23..c6d2e6adff 100644 --- a/packages/agent/chain.md +++ b/packages/agent/chain.md @@ -34,14 +34,14 @@ const backend = new Backend( log
const result: Connection = await backend.connect( parameter, )-## abstract method [*backend.getIdentity*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L107) +## abstract method [*backend.getIdentity*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L107)
backend.getIdentity( name: string, @@ -70,12 +70,12 @@ const block = new Block( height-## method [*connection.getBalanceOf*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L359) +## method [*connection.getBalanceOf*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L360) Get the balance in a native token of a given address, either in this connection's gas token, or in another given token. @@ -296,7 +193,7 @@ or in another given token. ) -## method [*connection.getBlock*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L219) +## method [*connection.getBlock*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L219) Get info about a specific block. If no height is passed, gets info about the latest block.number. Monotonically incrementing ID of block. -## abstract method [*block.getTransactionsById*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L605) +## abstract method [*block.getTransactionsById*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L612)const result: Record<string, Transaction> = await block.getTransactionsById()-## abstract method [*block.getTransactionsInOrder*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L608) +## abstract method [*block.getTransactionsInOrder*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L615)block.getTransactionsInOrder()@@ -155,116 +155,13 @@ this property contains the URL to which requests are sent. nextBlock-## method [*connection.batch*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L584) +## method [*connection.batch*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L591) Construct a transaction batch. const result: Batch<Connection> = connection.batch()-## abstract method [*connection.doExecute*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L579) --const result: unknown = connection.doExecute( - contract, - message: Message, - options, -) -- -## abstract method [*connection.doGetBalance*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L406) --connection.doGetBalance( - token: string, - address: string, -) -- -## abstract method [*connection.doGetBlockInfo*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L215) --const result: Block = await connection.doGetBlockInfo( - height: number, -) -- -## abstract method [*connection.doGetCodeHashOfAddress*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L272) --const result: string = connection.doGetCodeHashOfAddress( - contract: string, -) -- -## abstract method [*connection.doGetCodeHashOfCodeId*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L256) --const result: string = connection.doGetCodeHashOfCodeId( - codeId: string, -) -- -## abstract method [*connection.doGetCodeId*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L240) --const result: string = connection.doGetCodeId( - contract: string, -) -- -## abstract method [*connection.doGetCodes*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L296) --const result: Record<string, UploadedCode> = await connection.doGetCodes() -- -## abstract method [*connection.doGetContractsByCodeId*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L316) --const result: Iterable<> = await connection.doGetContractsByCodeId( - id: string, -) -- -## abstract method [*connection.doGetHeight*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L207) --const result: number = connection.doGetHeight() -- -## abstract method [*connection.doInstantiate*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L552) --const result: Partial<ContractInstance> = await connection.doInstantiate( - codeId: string, - options: Partial<ContractInstance>, -) -- -## abstract method [*connection.doQuery*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L422) --const result: unknown = connection.doQuery( - contract, - message: Message, -) -- -## abstract method [*connection.doSend*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L450) --const result: unknown = connection.doSend( - recipient: string, - amounts: ICoin[], - options, -) -- -## abstract method [*connection.doSendMany*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L454) --const result: unknown = connection.doSendMany( - outputs, - options: unknown, -) -- -## abstract method [*connection.doUpload*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L503) --const result: Partial<UploadedCode> = await connection.doUpload( - data: Uint8Array, - options, -) -- -## method [*connection.execute*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L557) +## method [*connection.execute*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L564) Call a given program's transaction method.const result: unknown = connection.execute( @@ -274,7 +171,7 @@ Call a given program's transaction method. )-## method [*connection.getBalanceIn*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L384) +## method [*connection.getBalanceIn*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L385) Get the balance in a given native token, of either this connection's identity's address, or of another given address. @@ -285,7 +182,7 @@ or of another given address. )
@@ -305,7 +202,7 @@ If no height is passed, gets info about the latest block. )-## method [*connection.getCodeHashOfAddress*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L261) +## method [*connection.getCodeHashOfAddress*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L261) Get the code hash of a given address.
const result: string = connection.getCodeHashOfAddress( @@ -313,7 +210,7 @@ Get the code hash of a given address. )-## method [*connection.getCodeHashOfCodeId*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L245) +## method [*connection.getCodeHashOfCodeId*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L245) Get the code hash of a given code id.
const result: string = connection.getCodeHashOfCodeId( @@ -321,7 +218,7 @@ Get the code hash of a given code id. )-## method [*connection.getCodeId*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L229) +## method [*connection.getCodeId*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L229) Get the code id of a given address.
const result: string = connection.getCodeId( @@ -329,12 +226,12 @@ Get the code id of a given address. )-## method [*connection.getCodes*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L291) +## method [*connection.getCodes*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L291)
const result: Record<string, UploadedCode> = await connection.getCodes()-## method [*connection.getContract*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L277) +## method [*connection.getContract*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L277) Get a client handle for a specific smart contract, authenticated as as this agent.
const result: Contract = connection.getContract( @@ -342,7 +239,7 @@ Get a client handle for a specific smart contract, authenticated as as this agen )-## method [*connection.getContractsByCodeId*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L299) +## method [*connection.getContractsByCodeId*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L300) Get client handles for all contracts that match a code ID
const result: Record<string, Contract> = await connection.getContractsByCodeId( @@ -356,7 +253,7 @@ Get client handles for all contracts that match a code ID )-## method [*connection.getContractsByCodeIds*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L321) +## method [*connection.getContractsByCodeIds*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L322) Get client handles for all contracts that match multiple code IDs
const result: Record<string, Record> = await connection.getContractsByCodeIds( @@ -375,7 +272,7 @@ Get client handles for all contracts that match multiple code IDs )-## method [*connection.instantiate*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L513) +## method [*connection.instantiate*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L520) Instantiate a new program from a code id, label and init message.
connection.instantiate( @@ -384,7 +281,7 @@ connection.instantiate( )-## method [*connection.query*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L411) +## method [*connection.query*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L412) Query a contract.
const result: Q = await connection.query( @@ -393,7 +290,7 @@ Query a contract. )-## method [*connection.send*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L427) +## method [*connection.send*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L428) Send native tokens to 1 recipient.
const result: unknown = connection.send( @@ -403,7 +300,7 @@ Send native tokens to 1 recipient. )-## method [*connection.upload*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L459) +## method [*connection.upload*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L460) Upload a contract's code, generating a new code id/hash pair.
connection.upload( @@ -412,7 +309,7 @@ connection.upload( )-## method [*connection.gas*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L119) +## method [*connection.gas*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L119) Native token of chain.
const result: TokenAmount = connection.gas( @@ -441,7 +338,7 @@ const contract = new Contract( logConsole. -## method [*contract.execute*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L646) +## method [*contract.execute*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L653) Execute a transaction on the specified instance as the specified Connection.const result: unknown = contract.execute( @@ -450,7 +347,7 @@ Execute a transaction on the specified instance as the specified Connection. )-## method [*contract.query*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L633) +## method [*contract.query*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L640) Execute a query on the specified instance as the specified Connection.const result: Q = await contract.query( diff --git a/packages/agent/deploy.md b/packages/agent/deploy.md index 280aa9291f..f7f2ec1388 100644 --- a/packages/agent/deploy.md +++ b/packages/agent/deploy.md @@ -322,7 +322,7 @@ const contractCode = new ContractCode( uploaderundefined. -## method [*contractCode.compile*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/deploy.ts#L36) +## method [*contractCode.compile*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/deploy.ts#L36) Compile this contract, unless a valid binary is present and a rebuild is not requested.contractCode.compile( @@ -330,7 +330,7 @@ contractCode.compile( )-## method [*contractCode.upload*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/deploy.ts#L68) +## method [*contractCode.upload*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/deploy.ts#L68) Upload this contract, unless a valid upload is present and a rebuild is not requested.contractCode.upload( @@ -417,7 +417,7 @@ const contractInstance = new ContractInstance( uploaderundefined. -## method [*contractInstance.compile*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/deploy.ts#L36) +## method [*contractInstance.compile*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/deploy.ts#L36) Compile this contract, unless a valid binary is present and a rebuild is not requested.contractInstance.compile( @@ -425,7 +425,7 @@ contractInstance.compile( )-## method [*contractInstance.connect*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/deploy.ts#L274) +## method [*contractInstance.connect*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/deploy.ts#L274) Returns a client to this contract instance.const result: Contract = contractInstance.connect( @@ -433,24 +433,24 @@ Returns a client to this contract instance. )-## method [*contractInstance.deploy*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/deploy.ts#L235) +## method [*contractInstance.deploy*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/deploy.ts#L235)contractInstance.deploy( __namedParameters, )-## method [*contractInstance.isValid*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/deploy.ts#L282) +## method [*contractInstance.isValid*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/deploy.ts#L282)contractInstance.isValid()-## method [*contractInstance.serialize*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/deploy.ts#L265) +## method [*contractInstance.serialize*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/deploy.ts#L265)contractInstance.serialize()-## method [*contractInstance.upload*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/deploy.ts#L68) +## method [*contractInstance.upload*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/deploy.ts#L68) Upload this contract, unless a valid upload is present and a rebuild is not requested.contractInstance.upload( @@ -510,7 +510,7 @@ const contractTemplate = new ContractTemplate( uploader-## method [*deployment.upload*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/deploy.ts#L427) +## method [*deployment.upload*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/deploy.ts#L427)undefined. -## method [*contractTemplate.compile*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/deploy.ts#L36) +## method [*contractTemplate.compile*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/deploy.ts#L36) Compile this contract, unless a valid binary is present and a rebuild is not requested.contractTemplate.compile( @@ -518,7 +518,7 @@ contractTemplate.compile( )-## method [*contractTemplate.contract*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/deploy.ts#L187) +## method [*contractTemplate.contract*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/deploy.ts#L187) Create a new instance of this contract.const result: ContractInstance = contractTemplate.contract( @@ -527,7 +527,7 @@ Create a new instance of this contract. )-## method [*contractTemplate.contracts*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/deploy.ts#L193) +## method [*contractTemplate.contracts*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/deploy.ts#L193) Create multiple instances of this contract.const result: Record<string, ContractInstance> = contractTemplate.contracts( @@ -535,12 +535,12 @@ Create multiple instances of this contract. )-## method [*contractTemplate.serialize*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/deploy.ts#L178) +## method [*contractTemplate.serialize*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/deploy.ts#L178)contractTemplate.serialize()-## method [*contractTemplate.upload*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/deploy.ts#L68) +## method [*contractTemplate.upload*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/deploy.ts#L68) Upload this contract, unless a valid upload is present and a rebuild is not requested.contractTemplate.upload( @@ -577,21 +577,21 @@ Returns an iterable of entries in the map. const result: IterableIterator<> = deployment.[iterator]()-## method [*deployment.addContract*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/deploy.ts#L374) +## method [*deployment.addContract*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/deploy.ts#L374)const result: Deployment = deployment.addContract( ...args, )-## method [*deployment.addContracts*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/deploy.ts#L382) +## method [*deployment.addContracts*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/deploy.ts#L382)const result: Deployment = deployment.addContracts( ...args, )-## method [*deployment.build*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/deploy.ts#L390) +## method [*deployment.build*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/deploy.ts#L390)const result: Record<string, > = await deployment.build( __namedParameters, @@ -603,7 +603,7 @@ Returns an iterable of entries in the map. const result: void = deployment.clear()-## method [*deployment.contract*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/deploy.ts#L352) +## method [*deployment.contract*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/deploy.ts#L352) Define a contract that will be automatically compiled, uploaded, and instantiated as part of this deployment.@@ -621,7 +621,7 @@ and instantiated as part of this deployment. )-## method [*deployment.deploy*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/deploy.ts#L444) +## method [*deployment.deploy*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/deploy.ts#L444)const result: Record<string, > = await deployment.deploy( __namedParameters, @@ -665,12 +665,12 @@ Returns an iterable of keys in the map const result: IterableIterator<string> = deployment.keys()-## method [*deployment.serialize*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/deploy.ts#L310) +## method [*deployment.serialize*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/deploy.ts#L310)deployment.serialize()-## method [*deployment.set*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/deploy.ts#L318) +## method [*deployment.set*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/deploy.ts#L318)deployment.set( name: string, @@ -678,7 +678,7 @@ deployment.set( )-## method [*deployment.template*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/deploy.ts#L329) +## method [*deployment.template*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/deploy.ts#L329) Define a template, representing code that can be compiled and uploaded, but will not be automatically instantiated. This can then be used to define multiple instances of @@ -690,7 +690,7 @@ the same code. )const result: Record<string, > = await deployment.upload( __namedParameters, @@ -703,7 +703,7 @@ Returns an iterable of values in the map const result: IterableIterator<DeploymentUnit> = deployment.values()-## method [*deployment.fromSnapshot*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/deploy.ts#L295) +## method [*deployment.fromSnapshot*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/deploy.ts#L295)const result: Deployment = deployment.fromSnapshot( __namedParameters: Partial<>, @@ -759,7 +759,7 @@ const deploymentUnit = new DeploymentUnit( uploaderundefined. -## method [*deploymentUnit.compile*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/deploy.ts#L36) +## method [*deploymentUnit.compile*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/deploy.ts#L36) Compile this contract, unless a valid binary is present and a rebuild is not requested.deploymentUnit.compile( @@ -767,12 +767,12 @@ deploymentUnit.compile( )-## method [*deploymentUnit.serialize*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/deploy.ts#L178) +## method [*deploymentUnit.serialize*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/deploy.ts#L178)deploymentUnit.serialize()-## method [*deploymentUnit.upload*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/deploy.ts#L68) +## method [*deploymentUnit.upload*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/deploy.ts#L68) Upload this contract, unless a valid upload is present and a rebuild is not requested.deploymentUnit.upload( @@ -815,7 +815,7 @@ const uploadedCode = new UploadedCode( canInstantiateInfo-## method [*uploadedCode.serialize*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/deploy.ts#L124) +## method [*uploadedCode.serialize*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/deploy.ts#L124) uploadedCode.serialize()diff --git a/packages/agent/identity.md b/packages/agent/identity.md index 5f815c4f7c..9da8676b06 100644 --- a/packages/agent/identity.md +++ b/packages/agent/identity.md @@ -56,7 +56,7 @@ const identity = new Identity( namestring. Display name. -## method [*identity.sign*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/identity.ts#L18) +## method [*identity.sign*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/identity.ts#L18)const result: unknown = identity.sign( doc: any, diff --git a/packages/agent/program.md b/packages/agent/program.md index 7525931064..855359ba04 100644 --- a/packages/agent/program.md +++ b/packages/agent/program.md @@ -181,28 +181,23 @@ const compiledCode = new CompiledCode( canUploadInfo-## method [*stubConnection.getBlock*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L219) +## method [*stubConnection.getBlock*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L219) Get info about a specific block. If no height is passed, gets info about the latest block.-## method [*compiledCode.computeHash*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/program.browser.ts#L262) +## method [*compiledCode.computeHash*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/program.browser.ts#L262) Compute the code hash if missing; throw if different. compiledCode.computeHash()-## method [*compiledCode.doFetch*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/program.browser.ts#L252) --const result: Uint8Array = await compiledCode.doFetch() -- -## method [*compiledCode.fetch*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/program.browser.ts#L226) +## method [*compiledCode.fetch*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/program.browser.ts#L226)const result: Uint8Array = await compiledCode.fetch()-## method [*compiledCode.serialize*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/program.browser.ts#L194) +## method [*compiledCode.serialize*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/program.browser.ts#L194)compiledCode.serialize()-## method [*compiledCode.toCodeHash*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/program.browser.ts#L274) +## method [*compiledCode.toCodeHash*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/program.browser.ts#L274)const result: string = compiledCode.toCodeHash( data: Uint8Array, @@ -229,7 +224,7 @@ binary and checksum are both present in wasm/ directory log-## method [*compiler.buildMany*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/program.browser.ts#L27) +## method [*compiler.buildMany*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/program.browser.ts#L27) Build multiple sources. Default implementation of buildMany is sequential. Compiler classes may override this to optimize. @@ -282,28 +277,23 @@ const localCompiledCode = new LocalCompiledCode( canUploadInfoConsole. -## abstract method [*compiler.build*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/program.browser.ts#L21) +## abstract method [*compiler.build*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/program.browser.ts#L21) Compile a source. `@hackbg/fadroma` implements dockerized and non-dockerized variants using its `build.impl.mjs` script. @@ -240,7 +235,7 @@ variants using its `build.impl.mjs` script. )-## method [*localCompiledCode.computeHash*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/program.browser.ts#L262) +## method [*localCompiledCode.computeHash*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/program.browser.ts#L262) Compute the code hash if missing; throw if different. localCompiledCode.computeHash()-## method [*localCompiledCode.doFetch*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/program.ts#L12) --localCompiledCode.doFetch() -- -## method [*localCompiledCode.fetch*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/program.browser.ts#L226) +## method [*localCompiledCode.fetch*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/program.browser.ts#L226)const result: Uint8Array = await localCompiledCode.fetch()-## method [*localCompiledCode.serialize*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/program.browser.ts#L194) +## method [*localCompiledCode.serialize*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/program.browser.ts#L194)localCompiledCode.serialize()-## method [*localCompiledCode.toCodeHash*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/program.browser.ts#L274) +## method [*localCompiledCode.toCodeHash*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/program.browser.ts#L274)const result: string = localCompiledCode.toCodeHash( data: Uint8Array, @@ -360,7 +350,7 @@ const rustSourceCode = new RustSourceCode( canFetchInfo-## method [*deployStore.get*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/store.ts#L17) +## method [*deployStore.get*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/store.ts#L17)-## method [*rustSourceCode.serialize*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/program.browser.ts#L116) +## method [*rustSourceCode.serialize*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/program.browser.ts#L116) rustSourceCode.serialize()@@ -403,7 +393,7 @@ const sourceCode = new SourceCode( canFetchInfo-## method [*sourceCode.serialize*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/program.browser.ts#L61) +## method [*sourceCode.serialize*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/program.browser.ts#L61) sourceCode.serialize()diff --git a/packages/agent/store.md b/packages/agent/store.md index f4706c3571..d975a02bfa 100644 --- a/packages/agent/store.md +++ b/packages/agent/store.md @@ -56,7 +56,7 @@ Executes a provided function once per each key/value pair in the Map, in inserti )const result: Partial<> = deployStore.get( name: string, @@ -77,7 +77,7 @@ Returns an iterable of keys in the map const result: IterableIterator<string> = deployStore.keys()-## method [*deployStore.set*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/store.ts#L24) +## method [*deployStore.set*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/store.ts#L24)deployStore.set( name: string, @@ -141,7 +141,7 @@ Executes a provided function once per each key/value pair in the Map, in inserti )-## method [*uploadStore.get*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/store.ts#L37) +## method [*uploadStore.get*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/store.ts#L37)const result: UploadedCode = uploadStore.get( codeHash: string, @@ -162,7 +162,7 @@ Returns an iterable of keys in the map const result: IterableIterator<string> = uploadStore.keys()-## method [*uploadStore.set*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/store.ts#L41) +## method [*uploadStore.set*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/store.ts#L41)uploadStore.set( codeHash: string, diff --git a/packages/agent/stub.md b/packages/agent/stub.md index 2eaa8b0dc2..f5c4760c07 100644 --- a/packages/agent/stub.md +++ b/packages/agent/stub.md @@ -51,42 +51,42 @@ const stubBackend = new StubBackend( url-## method [*stubConnection.getBalanceOf*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L359) +## method [*stubConnection.getBalanceOf*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L360) Get the balance in a native token of a given address, either in this connection's gas token, or in another given token. @@ -453,16 +453,16 @@ or in another given token. )string. -## method [*stubBackend.connect*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/stub.ts#L190) +## method [*stubBackend.connect*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L190)const result: Connection = await stubBackend.connect( parameter, )-## method [*stubBackend.execute*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/stub.ts#L258) +## method [*stubBackend.execute*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L258)const result: unknown = stubBackend.execute( ...args: unknown, )-## method [*stubBackend.export*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/stub.ts#L229) +## method [*stubBackend.export*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L229)const result: unknown = stubBackend.export( ...args: unknown, )-## method [*stubBackend.getIdentity*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/stub.ts#L208) +## method [*stubBackend.getIdentity*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L208)const result: Identity = await stubBackend.getIdentity( name: string, )-## method [*stubBackend.import*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/stub.ts#L225) +## method [*stubBackend.import*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L225)const result: unknown = stubBackend.import( ...args: unknown, )-## method [*stubBackend.instantiate*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/stub.ts#L243) +## method [*stubBackend.instantiate*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L243)stubBackend.instantiate( creator: string, @@ -95,17 +95,17 @@ stubBackend.instantiate( )-## method [*stubBackend.pause*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/stub.ts#L220) +## method [*stubBackend.pause*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L220)const result: StubBackend = await stubBackend.pause()-## method [*stubBackend.start*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/stub.ts#L215) +## method [*stubBackend.start*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L215)const result: StubBackend = await stubBackend.start()-## method [*stubBackend.upload*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/stub.ts#L233) +## method [*stubBackend.upload*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L233)stubBackend.upload( codeData: Uint8Array, @@ -132,7 +132,7 @@ const stubBatch = new StubBatch( messages-## method [*stubCompiler.buildMany*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/program.browser.ts#L27) +## method [*stubCompiler.buildMany*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/program.browser.ts#L27) Build multiple sources. Default implementation of buildMany is sequential. Compiler classes may override this to optimize. @@ -315,13 +315,13 @@ this property contains the URL to which requests are sent. nextBlockundefined. -## method [*stubBatch.execute*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/stub.ts#L276) +## method [*stubBatch.execute*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L276) Add an execute message to the batch.const result: StubBatch = stubBatch.execute( @@ -140,7 +140,7 @@ Add an execute message to the batch. )-## method [*stubBatch.instantiate*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/stub.ts#L271) +## method [*stubBatch.instantiate*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L271) Add an instantiate message to the batch.const result: StubBatch = stubBatch.instantiate( @@ -148,13 +148,13 @@ Add an instantiate message to the batch. )-## method [*stubBatch.submit*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/stub.ts#L281) +## method [*stubBatch.submit*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L281) Submit the batch.stubBatch.submit()-## method [*stubBatch.upload*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/stub.ts#L266) +## method [*stubBatch.upload*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L266) Add an upload message to the batch.const result: StubBatch = stubBatch.upload( @@ -163,7 +163,7 @@ Add an upload message to the batch.# class *StubBlock* -The building block of a blockchain is, well, the block. +The building block of a blockchain. Each block contains collection of transactions that are appended to the blockchain at a given point in time. @@ -184,12 +184,12 @@ const stubBlock = new StubBlock( heightnumber. Monotonically incrementing ID of block. -## method [*stubBlock.getTransactionsById*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/stub.ts#L18) +## method [*stubBlock.getTransactionsById*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L18)const result: Record<string, Transaction> = await stubBlock.getTransactionsById()-## method [*stubBlock.getTransactionsInOrder*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/stub.ts#L21) +## method [*stubBlock.getTransactionsInOrder*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L21)stubBlock.getTransactionsInOrder()@@ -216,7 +216,7 @@ binary and checksum are both present in wasm/ directory logConsole. -## method [*stubCompiler.build*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/stub.ts#L297) +## method [*stubCompiler.build*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L297) Compile a source. `@hackbg/fadroma` implements dockerized and non-dockerized variants using its `build.impl.mjs` script. @@ -227,7 +227,7 @@ variants using its `build.impl.mjs` script. )-## method [*stubConnection.batch*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/stub.ts#L36) +## method [*stubConnection.batch*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L36) Construct a transaction batch. const result: Batch<StubConnection> = stubConnection.batch()-## method [*stubConnection.doExecute*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/stub.ts#L125) +## method [*stubConnection.doExecute*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L125)const result: unknown = stubConnection.doExecute( contract, @@ -330,7 +330,7 @@ Construct a transaction batch. )-## method [*stubConnection.doGetBalance*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/stub.ts#L52) +## method [*stubConnection.doGetBalance*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L52)const result: string = stubConnection.doGetBalance( token: string, @@ -338,50 +338,50 @@ Construct a transaction batch. )-## method [*stubConnection.doGetBlockInfo*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/stub.ts#L42) +## method [*stubConnection.doGetBlockInfo*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L42)const result: StubBlock = await stubConnection.doGetBlockInfo()-## method [*stubConnection.doGetCodeHashOfAddress*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/stub.ts#L69) +## method [*stubConnection.doGetCodeHashOfAddress*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L69)const result: string = stubConnection.doGetCodeHashOfAddress( address: string, )-## method [*stubConnection.doGetCodeHashOfCodeId*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/stub.ts#L73) +## method [*stubConnection.doGetCodeHashOfCodeId*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L73)const result: string = stubConnection.doGetCodeHashOfCodeId( id: string, )-## method [*stubConnection.doGetCodeId*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/stub.ts#L58) +## method [*stubConnection.doGetCodeId*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L58)const result: string = stubConnection.doGetCodeId( address: string, )-## method [*stubConnection.doGetCodes*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/stub.ts#L45) +## method [*stubConnection.doGetCodes*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L45)stubConnection.doGetCodes()-## method [*stubConnection.doGetContractsByCodeId*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/stub.ts#L65) +## method [*stubConnection.doGetContractsByCodeId*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L65)stubConnection.doGetContractsByCodeId( id: string, )-## method [*stubConnection.doGetHeight*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/stub.ts#L39) +## method [*stubConnection.doGetHeight*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L39)const result: number = stubConnection.doGetHeight()-## method [*stubConnection.doInstantiate*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/stub.ts#L116) +## method [*stubConnection.doInstantiate*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L116)stubConnection.doInstantiate( codeId: string, @@ -389,7 +389,7 @@ stubConnection.doInstantiate( )-## method [*stubConnection.doQuery*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/stub.ts#L80) +## method [*stubConnection.doQuery*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L80)const result: Q = await stubConnection.doQuery( contract, @@ -397,7 +397,7 @@ stubConnection.doInstantiate( )-## method [*stubConnection.doSend*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/stub.ts#L83) +## method [*stubConnection.doSend*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L83)const result: void = stubConnection.doSend( recipient: string, @@ -406,7 +406,7 @@ stubConnection.doInstantiate( )-## method [*stubConnection.doSendMany*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/stub.ts#L110) +## method [*stubConnection.doSendMany*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L110)const result: void = stubConnection.doSendMany( outputs, @@ -414,14 +414,14 @@ stubConnection.doInstantiate( )-## method [*stubConnection.doUpload*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/stub.ts#L113) +## method [*stubConnection.doUpload*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/stub.ts#L113)const result: UploadedCode = await stubConnection.doUpload( codeData: Uint8Array, )-## method [*stubConnection.execute*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L557) +## method [*stubConnection.execute*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L564) Call a given program's transaction method.const result: unknown = stubConnection.execute( @@ -431,7 +431,7 @@ Call a given program's transaction method. )-## method [*stubConnection.getBalanceIn*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L384) +## method [*stubConnection.getBalanceIn*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L385) Get the balance in a given native token, of either this connection's identity's address, or of another given address. @@ -442,7 +442,7 @@ or of another given address. )-const result: StubBlock = await stubConnection.getBlock( +const result: Block = await stubConnection.getBlock( height: number, )-## method [*stubConnection.getCodeHashOfAddress*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L261) +## method [*stubConnection.getCodeHashOfAddress*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L261) Get the code hash of a given address.const result: string = stubConnection.getCodeHashOfAddress( @@ -470,7 +470,7 @@ Get the code hash of a given address. )-## method [*stubConnection.getCodeHashOfCodeId*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L245) +## method [*stubConnection.getCodeHashOfCodeId*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L245) Get the code hash of a given code id.const result: string = stubConnection.getCodeHashOfCodeId( @@ -478,7 +478,7 @@ Get the code hash of a given code id. )-## method [*stubConnection.getCodeId*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L229) +## method [*stubConnection.getCodeId*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L229) Get the code id of a given address.const result: string = stubConnection.getCodeId( @@ -486,12 +486,12 @@ Get the code id of a given address. )-## method [*stubConnection.getCodes*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L291) +## method [*stubConnection.getCodes*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L291)const result: Record<string, UploadedCode> = await stubConnection.getCodes()-## method [*stubConnection.getContract*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L277) +## method [*stubConnection.getContract*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L277) Get a client handle for a specific smart contract, authenticated as as this agent.const result: Contract = stubConnection.getContract( @@ -499,7 +499,7 @@ Get a client handle for a specific smart contract, authenticated as as this agen )-## method [*stubConnection.getContractsByCodeId*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L299) +## method [*stubConnection.getContractsByCodeId*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L300) Get client handles for all contracts that match a code IDconst result: Record<string, Contract> = await stubConnection.getContractsByCodeId( @@ -513,7 +513,7 @@ Get client handles for all contracts that match a code ID )-## method [*stubConnection.getContractsByCodeIds*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L321) +## method [*stubConnection.getContractsByCodeIds*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L322) Get client handles for all contracts that match multiple code IDsconst result: Record<string, Record> = await stubConnection.getContractsByCodeIds( @@ -532,7 +532,7 @@ Get client handles for all contracts that match multiple code IDs )-## method [*stubConnection.instantiate*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L513) +## method [*stubConnection.instantiate*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L520) Instantiate a new program from a code id, label and init message.stubConnection.instantiate( @@ -541,7 +541,7 @@ stubConnection.instantiate( )-## method [*stubConnection.query*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L411) +## method [*stubConnection.query*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L412) Query a contract.const result: Q = await stubConnection.query( @@ -550,7 +550,7 @@ Query a contract. )-## method [*stubConnection.send*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L427) +## method [*stubConnection.send*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L428) Send native tokens to 1 recipient.const result: unknown = stubConnection.send( @@ -560,7 +560,7 @@ Send native tokens to 1 recipient. )-## method [*stubConnection.upload*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L459) +## method [*stubConnection.upload*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L460) Upload a contract's code, generating a new code id/hash pair.stubConnection.upload( @@ -569,7 +569,7 @@ stubConnection.upload( )-## method [*stubConnection.gas*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/chain.ts#L119) +## method [*stubConnection.gas*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/chain.ts#L119) Native token of chain.const result: TokenAmount = stubConnection.gas( diff --git a/packages/agent/token.md b/packages/agent/token.md index 6425c3b3fc..19d78e134f 100644 --- a/packages/agent/token.md +++ b/packages/agent/token.md @@ -72,19 +72,19 @@ const amount = new Amount( denom-## method [*amount.asCoin*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/token.ts#L115) +## method [*amount.asCoin*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/token.ts#L115) const result: ICoin = amount.asCoin()-## method [*amount.asFee*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/token.ts#L122) +## method [*amount.asFee*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/token.ts#L122)const result: IFee = amount.asFee( gas: string, )-## method [*amount.toString*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/token.ts#L111) +## method [*amount.toString*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/token.ts#L111)const result: string = amount.toString()@@ -128,32 +128,32 @@ const custom = new Custom( id-## method [*custom.amount*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/token.ts#L84) +## method [*custom.amount*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/token.ts#L84) const result: TokenAmount = custom.amount( amount, )-## method [*custom.isCustom*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/token.ts#L151) +## method [*custom.isCustom*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/token.ts#L151)const result: boolean = custom.isCustom()-## method [*custom.isFungible*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/token.ts#L74) +## method [*custom.isFungible*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/token.ts#L74)const result: boolean = custom.isFungible()-## method [*custom.isNative*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/token.ts#L153) +## method [*custom.isNative*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/token.ts#L153)const result: boolean = custom.isNative()-## method [*custom.addZeros*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/token.ts#L80) +## method [*custom.addZeros*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/token.ts#L80)const result: string = custom.addZeros( n, @@ -180,7 +180,7 @@ const fee = new Fee( gasstring. -## method [*fee.add*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/token.ts#L32) +## method [*fee.add*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/token.ts#L32)const result: void = fee.add( amount, @@ -200,32 +200,32 @@ new Fungible() id-## method [*fungible.amount*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/token.ts#L84) +## method [*fungible.amount*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/token.ts#L84) const result: TokenAmount = fungible.amount( amount, )-## abstract method [*fungible.isCustom*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/token.ts#L78) +## abstract method [*fungible.isCustom*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/token.ts#L78) Whether this token is implemented by a smart contract.fungible.isCustom()-## method [*fungible.isFungible*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/token.ts#L74) +## method [*fungible.isFungible*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/token.ts#L74)const result: boolean = fungible.isFungible()-## abstract method [*fungible.isNative*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/token.ts#L76) +## abstract method [*fungible.isNative*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/token.ts#L76) Whether this token is natively supported by the chain.fungible.isNative()-## method [*fungible.addZeros*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/token.ts#L80) +## method [*fungible.addZeros*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/token.ts#L80)const result: string = fungible.addZeros( n, @@ -250,39 +250,39 @@ const native = new Native( id-## method [*native.amount*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/token.ts#L84) +## method [*native.amount*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/token.ts#L84) const result: TokenAmount = native.amount( amount, )-## method [*native.fee*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/token.ts#L140) +## method [*native.fee*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/token.ts#L140)const result: IFee = native.fee( amount, )-## method [*native.isCustom*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/token.ts#L136) +## method [*native.isCustom*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/token.ts#L136)const result: boolean = native.isCustom()-## method [*native.isFungible*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/token.ts#L74) +## method [*native.isFungible*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/token.ts#L74)const result: boolean = native.isFungible()-## method [*native.isNative*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/token.ts#L138) +## method [*native.isNative*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/token.ts#L138)const result: boolean = native.isNative()-## method [*native.addZeros*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/token.ts#L80) +## method [*native.addZeros*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/token.ts#L80)const result: string = native.addZeros( n, @@ -302,7 +302,7 @@ new NonFungible() id-## method [*nonFungible.isFungible*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/token.ts#L68) +## method [*nonFungible.isFungible*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/token.ts#L68) const result: boolean = nonFungible.isFungible() @@ -362,7 +362,7 @@ new Token() id-## abstract method [*token.isFungible*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/token.ts#L62) +## abstract method [*token.isFungible*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/token.ts#L62) Whether this token is fungible. token.isFungible() diff --git a/packages/agent/tx.md b/packages/agent/tx.md index a27d2207bd..9a53878c87 100644 --- a/packages/agent/tx.md +++ b/packages/agent/tx.md @@ -71,7 +71,7 @@ const batch = new Batch( logConsole. -## method [*batch.execute*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/tx.ts#L38) +## method [*batch.execute*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/tx.ts#L38) Add an execute message to the batch.batch.execute( @@ -79,7 +79,7 @@ batch.execute( )-## method [*batch.instantiate*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/tx.ts#L32) +## method [*batch.instantiate*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/tx.ts#L32) Add an instantiate message to the batch.batch.instantiate( @@ -87,7 +87,7 @@ batch.instantiate( )-## method [*batch.submit*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/tx.ts#L44) +## method [*batch.submit*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/tx.ts#L44) Submit the batch.const result: unknown = batch.submit( @@ -95,7 +95,7 @@ Submit the batch. )-## method [*batch.upload*](https://github.com/hackbg/fadroma/blob/fd82719114381eb4818e3b70fed53c9bdc7209b6/packages/agent/tx.ts#L26) +## method [*batch.upload*](https://github.com/hackbg/fadroma/blob/a228431ac8a4c97662d93a7420d030936fdc22f5/packages/agent/tx.ts#L26) Add an upload message to the batch.batch.upload( diff --git a/toolbox b/toolbox index 79707f47d0..28fe474bf2 160000 --- a/toolbox +++ b/toolbox @@ -1 +1 @@ -Subproject commit 79707f47d082e087dcd3bc86f3f74575dd13237a +Subproject commit 28fe474bf236ba14a6567a12e9bbe054087f6719