@firmachain/firma-js 0.2.30 → 0.2.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/sdk/FirmaAuthzService.d.ts +32 -0
  2. package/dist/sdk/FirmaAuthzService.js +630 -0
  3. package/dist/sdk/FirmaBankService.d.ts +2 -1
  4. package/dist/sdk/FirmaBankService.js +3 -0
  5. package/dist/sdk/FirmaCosmWasmService.d.ts +38 -0
  6. package/dist/sdk/FirmaCosmWasmService.js +667 -0
  7. package/dist/sdk/FirmaDistributionService.d.ts +2 -1
  8. package/dist/sdk/FirmaDistributionService.js +3 -0
  9. package/dist/sdk/FirmaMobileSDK.d.ts +3 -1
  10. package/dist/sdk/FirmaMobileSDK.js +4 -1
  11. package/dist/sdk/FirmaSDK.d.ts +5 -1
  12. package/dist/sdk/FirmaSDK.js +7 -1
  13. package/dist/sdk/FirmaStakingService.d.ts +2 -1
  14. package/dist/sdk/FirmaStakingService.js +3 -0
  15. package/dist/sdk/FirmaUtil.d.ts +1 -0
  16. package/dist/sdk/FirmaUtil.js +3 -0
  17. package/dist/sdk/firmachain/authz/AuthzQueryClient.d.ts +38 -0
  18. package/dist/sdk/firmachain/authz/AuthzQueryClient.js +115 -0
  19. package/dist/sdk/firmachain/authz/AuthzTxClient.d.ts +22 -0
  20. package/dist/sdk/firmachain/authz/AuthzTxClient.js +44 -0
  21. package/dist/sdk/firmachain/authz/AuthzTxTypes.d.ts +147 -0
  22. package/dist/sdk/firmachain/authz/AuthzTxTypes.js +358 -0
  23. package/dist/sdk/firmachain/authz/index.d.ts +3 -0
  24. package/dist/sdk/firmachain/authz/index.js +15 -0
  25. package/dist/sdk/firmachain/common/ITxClient.d.ts +3 -0
  26. package/dist/sdk/firmachain/common/ITxClient.js +9 -0
  27. package/dist/sdk/firmachain/cosmwasm/CosmWasmQueryClient.d.ts +52 -0
  28. package/dist/sdk/firmachain/cosmwasm/CosmWasmQueryClient.js +193 -0
  29. package/dist/sdk/firmachain/cosmwasm/CosmWasmTxClient.d.ts +37 -0
  30. package/dist/sdk/firmachain/cosmwasm/CosmWasmTxClient.js +56 -0
  31. package/dist/sdk/firmachain/cosmwasm/index.d.ts +3 -0
  32. package/dist/sdk/firmachain/cosmwasm/index.js +15 -0
  33. package/package.json +4 -2
@@ -1,10 +1,11 @@
1
- import { TxMisc, Token } from "./firmachain/bank";
1
+ import { BankTxClient, TxMisc, Token } from "./firmachain/bank";
2
2
  import { FirmaWalletService } from "./FirmaWalletService";
3
3
  import { FirmaConfig } from "./FirmaConfig";
4
4
  import { BroadcastTxResponse } from "./firmachain/common/stargateclient";
5
5
  export declare class FirmaBankService {
6
6
  private readonly config;
7
7
  constructor(config: FirmaConfig);
8
+ getTxClient(wallet: FirmaWalletService): BankTxClient;
8
9
  getGasEstimationSend(wallet: FirmaWalletService, targetAddress: string, amount: number, txMisc?: TxMisc): Promise<number>;
9
10
  getGasEstimationSendToken(wallet: FirmaWalletService, targetAddress: string, tokenID: string, amount: number, decimal: number, txMisc?: TxMisc): Promise<number>;
10
11
  sendToken(wallet: FirmaWalletService, targetAddress: string, tokenID: string, amount: number, decimal: number, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
@@ -43,6 +43,9 @@ var FirmaBankService = /** @class */ (function () {
43
43
  function FirmaBankService(config) {
44
44
  this.config = config;
45
45
  }
46
+ FirmaBankService.prototype.getTxClient = function (wallet) {
47
+ return new bank_1.BankTxClient(wallet, this.config.rpcAddress);
48
+ };
46
49
  FirmaBankService.prototype.getGasEstimationSend = function (wallet, targetAddress, amount, txMisc) {
47
50
  if (txMisc === void 0) { txMisc = FirmaUtil_1.DefaultTxMisc; }
48
51
  return __awaiter(this, void 0, void 0, function () {
@@ -0,0 +1,38 @@
1
+ import { CosmWasmTxClient, TxMisc, CodeInfo, CodeData, ContractInfo, ContractHistoryInfo, ContractStateInfo } from "./firmachain/cosmwasm";
2
+ import { FirmaWalletService } from "./FirmaWalletService";
3
+ import { FirmaConfig } from "./FirmaConfig";
4
+ import { BroadcastTxResponse } from "./firmachain/common/stargateclient";
5
+ import { Coin } from "cosmjs-types/cosmos/base/v1beta1/coin";
6
+ import { AccessConfig } from "cosmjs-types/cosmwasm/wasm/v1/types";
7
+ export declare class FirmaCosmWasmService {
8
+ private readonly config;
9
+ constructor(config: FirmaConfig);
10
+ getTxClient(wallet: FirmaWalletService): CosmWasmTxClient;
11
+ getGasEstimationStoreCode(wallet: FirmaWalletService, wasmCode: Uint8Array, accessConfig: AccessConfig, txMisc?: TxMisc): Promise<number>;
12
+ storeCode(wallet: FirmaWalletService, wasmCode: Uint8Array, accessConfig: AccessConfig, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
13
+ getGasEstimationUpdateAdmin(wallet: FirmaWalletService, contractAddress: string, adminAddress: string, txMisc?: TxMisc): Promise<number>;
14
+ updateAdmin(wallet: FirmaWalletService, contractAddress: string, adminAddress: string, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
15
+ getGasEstimationClearAdmin(wallet: FirmaWalletService, contractAddress: string, txMisc?: TxMisc): Promise<number>;
16
+ clearAdmin(wallet: FirmaWalletService, contractAddress: string, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
17
+ getGasEstimationMigrateContract(wallet: FirmaWalletService, contractAddress: string, codeId: string, msg: string, txMisc?: TxMisc): Promise<number>;
18
+ migrateContract(wallet: FirmaWalletService, contractAddress: string, codeId: string, msg: string, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
19
+ getGasEstimationExecuteContract(wallet: FirmaWalletService, contractAddress: string, msg: string, funds?: Coin[], txMisc?: TxMisc): Promise<number>;
20
+ executeContract(wallet: FirmaWalletService, contractAddress: string, msg: string, funds?: Coin[], txMisc?: TxMisc): Promise<BroadcastTxResponse>;
21
+ getGasEstimationInstantiateContract(wallet: FirmaWalletService, admin: string, codeId: string, label: string, msg: string, funds: Coin[], txMisc?: TxMisc): Promise<number>;
22
+ instantiateContract(wallet: FirmaWalletService, admin: string, codeId: string, label: string, msg: string, funds: Coin[], txMisc?: TxMisc): Promise<BroadcastTxResponse>;
23
+ private getSignedTxInstantiateContract;
24
+ private getSignedTxUpdateAdmin;
25
+ private getSignedTxClearAdmin;
26
+ private getSignedTxMigrateContract;
27
+ private getSignedTxExecuteContract;
28
+ private getSignedTxStoreCode;
29
+ getCodeList(): Promise<CodeInfo[]>;
30
+ getCodeData(codeId: string): Promise<CodeData>;
31
+ getContractListFromCodeId(codeId: string): Promise<string[]>;
32
+ getContractInfo(codeId: string): Promise<ContractInfo>;
33
+ getContractHistory(codeId: string): Promise<ContractHistoryInfo[]>;
34
+ getContractRawQueryData(contractAddress: string, hexString: string): Promise<string>;
35
+ getContractSmartQueryData(contractAddress: string, query: string): Promise<string>;
36
+ getContractState(codeId: string): Promise<ContractStateInfo[]>;
37
+ getPinnedCodeList(): Promise<string[]>;
38
+ }