@firmachain/firma-js 0.2.51 → 0.2.53

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.
package/dist/index.d.ts CHANGED
@@ -14,3 +14,22 @@ export * from './sdk/firmachain/staking';
14
14
  export * from './sdk/firmachain/token';
15
15
  export * from './sdk/firmachain/nft';
16
16
  export * from './sdk/firmachain/feegrant';
17
+ export * from './sdk/FirmaWalletService';
18
+ export * from './sdk/FirmaBankService';
19
+ export * from './sdk/FirmaFeeGrantService';
20
+ export * from './sdk/FirmaStakingService';
21
+ export * from './sdk/FirmaDistributionService';
22
+ export * from './sdk/FirmaGovService';
23
+ export * from './sdk/FirmaNftService';
24
+ export * from './sdk/FirmaTokenService';
25
+ export * from './sdk/FirmaContractService';
26
+ export * from './sdk/FirmaIpfsService';
27
+ export * from './sdk/FirmaChainService';
28
+ export * from './sdk/FirmaSlashingService';
29
+ export * from './sdk/FirmaAuthzService';
30
+ export * from './sdk/FirmaCosmWasmService';
31
+ export * from './sdk/FirmaIbcService';
32
+ export * from './sdk/FirmaMintService';
33
+ export * from './sdk/FirmaCosmWasmCw20';
34
+ export * from './sdk/FirmaCosmWasmCw721';
35
+ export * from './sdk/FirmaCosmWasmCwBridge';
package/dist/index.js CHANGED
@@ -26,3 +26,22 @@ __exportStar(require("./sdk/firmachain/staking"), exports);
26
26
  __exportStar(require("./sdk/firmachain/token"), exports);
27
27
  __exportStar(require("./sdk/firmachain/nft"), exports);
28
28
  __exportStar(require("./sdk/firmachain/feegrant"), exports);
29
+ __exportStar(require("./sdk/FirmaWalletService"), exports);
30
+ __exportStar(require("./sdk/FirmaBankService"), exports);
31
+ __exportStar(require("./sdk/FirmaFeeGrantService"), exports);
32
+ __exportStar(require("./sdk/FirmaStakingService"), exports);
33
+ __exportStar(require("./sdk/FirmaDistributionService"), exports);
34
+ __exportStar(require("./sdk/FirmaGovService"), exports);
35
+ __exportStar(require("./sdk/FirmaNftService"), exports);
36
+ __exportStar(require("./sdk/FirmaTokenService"), exports);
37
+ __exportStar(require("./sdk/FirmaContractService"), exports);
38
+ __exportStar(require("./sdk/FirmaIpfsService"), exports);
39
+ __exportStar(require("./sdk/FirmaChainService"), exports);
40
+ __exportStar(require("./sdk/FirmaSlashingService"), exports);
41
+ __exportStar(require("./sdk/FirmaAuthzService"), exports);
42
+ __exportStar(require("./sdk/FirmaCosmWasmService"), exports);
43
+ __exportStar(require("./sdk/FirmaIbcService"), exports);
44
+ __exportStar(require("./sdk/FirmaMintService"), exports);
45
+ __exportStar(require("./sdk/FirmaCosmWasmCw20"), exports);
46
+ __exportStar(require("./sdk/FirmaCosmWasmCw721"), exports);
47
+ __exportStar(require("./sdk/FirmaCosmWasmCwBridge"), exports);
@@ -1,4 +1,5 @@
1
1
  import { BankTxClient, TxMisc, Token } from "./firmachain/bank";
2
+ import { TxRaw } from "cosmjs-types/cosmos/tx/v1beta1/tx";
2
3
  import { FirmaWalletService } from "./FirmaWalletService";
3
4
  import { FirmaConfig } from "./FirmaConfig";
4
5
  import { BroadcastTxResponse } from "./firmachain/common/stargateclient";
@@ -16,5 +17,5 @@ export declare class FirmaBankService {
16
17
  getTokenBalanceList(address: string): Promise<Token[]>;
17
18
  getTokenBalance(address: string, tokenID: string): Promise<string>;
18
19
  getBalance(address: string): Promise<string>;
19
- private getSignedTxSend;
20
+ getSignedTxSend(wallet: FirmaWalletService, targetAddress: string, denom: string, amount: string, txMisc?: TxMisc): Promise<TxRaw>;
20
21
  }
@@ -1,17 +1,103 @@
1
1
  import { FirmaConfig } from "./FirmaConfig";
2
2
  import { FirmaCosmWasmService } from "./FirmaCosmWasmService";
3
+ import { FirmaWalletService } from "./FirmaWalletService";
4
+ import { TxMisc } from "./firmachain/common";
5
+ import { EncodeObject } from "@cosmjs/proto-signing";
6
+ import { BroadcastTxResponse } from "./firmachain/common/stargateclient";
7
+ export interface Cw20Minter {
8
+ minter: string;
9
+ cap: string;
10
+ }
11
+ export interface Cw20MarketingInfo {
12
+ project: string;
13
+ description: string;
14
+ logo: string;
15
+ marketing: string;
16
+ }
17
+ export interface ExpiresAtHeight {
18
+ at_height: number;
19
+ }
20
+ export interface ExpiresAtTime {
21
+ at_time: number;
22
+ }
23
+ export interface ExpiresNever {
24
+ never: {};
25
+ }
26
+ export declare type Expires = ExpiresAtHeight | ExpiresAtTime | ExpiresNever;
27
+ export interface Cw20Allowance {
28
+ allowance: string;
29
+ expires: Expires;
30
+ }
31
+ export interface Cw20SpenderAllowance {
32
+ allowance: string;
33
+ expires: Expires;
34
+ spender: string;
35
+ }
36
+ export declare class Cw20MsgData {
37
+ static getMsgDataTransfer(recipient: string, amount: string): string;
38
+ static getMsgDataTransferFrom(owner: string, recipient: string, amount: string): string;
39
+ static getMsgDataMint(recipient: string, amount: string): string;
40
+ static getMsgDataBurn(amount: string): string;
41
+ static getMsgDataBurnFrom(owner: string, amount: string): string;
42
+ static getMsgDataIncreaseAllowance(spender: string, amount: string, expires: Expires): string;
43
+ static getMsgDataDecreaseAllowance(spender: string, amount: string, expires: Expires): string;
44
+ static getMsgDataUpdateMinter(new_minter: string): string;
45
+ static getMsgDataUpdateMarketing(description: string, marketing: string, project: string): string;
46
+ static getMsgDataUploadLogo(url: string): string;
47
+ static getMsgDataSend(contract: string, amount: string, msg: any): string;
48
+ static getMsgDataSendFrom(contract: string, owner: string, amount: string, msg: any): string;
49
+ }
3
50
  export declare class FirmaCosmWasmCw20Service {
4
51
  private readonly config;
5
52
  private readonly cosmwasmService;
6
53
  constructor(config: FirmaConfig, cosmwasmService: FirmaCosmWasmService);
54
+ getCw721MsgData(): typeof Cw20MsgData;
55
+ transfer(wallet: FirmaWalletService, contractAddress: string, recipient: string, amount: string, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
56
+ getUnsignedTxTransfer(wallet: FirmaWalletService, contractAddress: string, recipient: string, amount: string): Promise<EncodeObject>;
57
+ transferFrom(wallet: FirmaWalletService, contractAddress: string, owner: string, recipient: string, amount: string, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
58
+ getUnsignedTxTransferFrom(wallet: FirmaWalletService, contractAddress: string, owner: string, recipient: string, amount: string): Promise<EncodeObject>;
59
+ mint(wallet: FirmaWalletService, contractAddress: string, recipient: string, amount: string, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
60
+ getUnsignedTxMint(wallet: FirmaWalletService, contractAddress: string, recipient: string, amount: string): Promise<EncodeObject>;
61
+ burn(wallet: FirmaWalletService, contractAddress: string, amount: string, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
62
+ getUnsignedTxBurn(wallet: FirmaWalletService, contractAddress: string, amount: string): Promise<EncodeObject>;
63
+ burnFrom(wallet: FirmaWalletService, contractAddress: string, owner: string, amount: string, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
64
+ getUnsignedTxBurnFrom(wallet: FirmaWalletService, contractAddress: string, owner: string, amount: string): Promise<EncodeObject>;
65
+ increaseAllowance(wallet: FirmaWalletService, contractAddress: string, spender: string, amount: string, expires: Expires, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
66
+ getUnsignedTxIncreaseAllowance(wallet: FirmaWalletService, contractAddress: string, spender: string, amount: string, expires: Expires): Promise<EncodeObject>;
67
+ decreaseAllowance(wallet: FirmaWalletService, contractAddress: string, spender: string, amount: string, expires: Expires, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
68
+ getUnsignedTxDecreaseAllowance(wallet: FirmaWalletService, contractAddress: string, spender: string, amount: string, expires: Expires): Promise<EncodeObject>;
69
+ updateMinter(wallet: FirmaWalletService, contractAddress: string, new_minter: string, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
70
+ getUnsignedTxUpdateMinter(wallet: FirmaWalletService, contractAddress: string, new_minter: string): Promise<EncodeObject>;
71
+ updateMarketing(wallet: FirmaWalletService, contractAddress: string, description: string, marketing: string, project: string, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
72
+ getUnsignedTxUpdateMarketing(wallet: FirmaWalletService, contractAddress: string, description: string, marketing: string, project: string): Promise<EncodeObject>;
73
+ uploadLogo(wallet: FirmaWalletService, contractAddress: string, url: string, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
74
+ getUnsignedTxUploadLogo(wallet: FirmaWalletService, contractAddress: string, url: string): Promise<EncodeObject>;
75
+ send(wallet: FirmaWalletService, contractAddress: string, targetContractAddress: string, amount: string, msg: any, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
76
+ getUnsignedTxSend(wallet: FirmaWalletService, contractAddress: string, targetContractAddress: string, amount: string, msg: any): Promise<EncodeObject>;
77
+ sendFrom(wallet: FirmaWalletService, contractAddress: string, targetContractAddress: string, owner: string, amount: string, msg: any, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
78
+ getUnsignedTxSendFrom(wallet: FirmaWalletService, contractAddress: string, targetContractAddress: string, owner: string, amount: string, msg: any): Promise<EncodeObject>;
79
+ signAndBroadcast(wallet: FirmaWalletService, msgList: EncodeObject[], txMisc?: TxMisc): Promise<BroadcastTxResponse>;
80
+ getGasEstimationSignAndBroadcast(wallet: FirmaWalletService, msgList: EncodeObject[], txMisc?: TxMisc): Promise<number>;
81
+ getGasEstimationTransfer(wallet: FirmaWalletService, contractAddress: string, recipient: string, amount: string): Promise<number>;
82
+ getGasEstimationTransferFrom(wallet: FirmaWalletService, contractAddress: string, owner: string, recipient: string, amount: string): Promise<number>;
83
+ getGasEstimationMint(wallet: FirmaWalletService, contractAddress: string, recipient: string, amount: string): Promise<number>;
84
+ getGasEstimationBurn(wallet: FirmaWalletService, contractAddress: string, amount: string): Promise<number>;
85
+ getGasEstimationBurnFrom(wallet: FirmaWalletService, contractAddress: string, owner: string, amount: string): Promise<number>;
86
+ getGasEstimationIncreaseAllowance(wallet: FirmaWalletService, contractAddress: string, spender: string, amount: string, expires: Expires): Promise<number>;
87
+ getGasEstimationDecreaseAllowance(wallet: FirmaWalletService, contractAddress: string, spender: string, amount: string, expires: Expires): Promise<number>;
88
+ getGasEstimationUpdateMinter(wallet: FirmaWalletService, contractAddress: string, new_minter: string): Promise<number>;
89
+ getGasEstimationUpdateMarketing(wallet: FirmaWalletService, contractAddress: string, description: string, marketing: string, project: string): Promise<number>;
90
+ getGasEstimationUploadLogo(wallet: FirmaWalletService, contractAddress: string, logo: string): Promise<number>;
91
+ getGasEstimationSend(wallet: FirmaWalletService, contractAddress: string, targetContractAddress: string, amount: string, msg: any): Promise<number>;
92
+ getGasEstimationSendFrom(wallet: FirmaWalletService, contractAddress: string, targetContractAddress: string, owner: string, amount: string, msg: any): Promise<number>;
7
93
  getBalance(contractAddress: string, address: string): Promise<string>;
8
94
  getTotalSupply(contractAddress: string): Promise<string>;
9
95
  getTokenInfo(contractAddress: string): Promise<string>;
10
- getMinter(contractAddress: string): Promise<string>;
11
- getAllowance(contractAddress: string, owner: string, spender: string): Promise<string>;
12
- getAllAllowances(contractAddress: string, owner: string): Promise<string>;
13
- getAllSpenderAllowances(contractAddress: string, spender: string): Promise<string>;
14
- getAllAccounts(contractAddress: string): Promise<string>;
15
- getMarketingInfo(contractAddress: string): Promise<string>;
96
+ getMinter(contractAddress: string): Promise<Cw20Minter>;
97
+ getAllowance(contractAddress: string, owner: string, spender: string): Promise<Cw20Allowance>;
98
+ getAllAllowances(contractAddress: string, owner: string, limit?: number, start_after?: string): Promise<Cw20SpenderAllowance[]>;
99
+ getAllSpenderAllowances(contractAddress: string, spender: string, limit?: number, start_after?: string): Promise<Cw20SpenderAllowance>;
100
+ getAllAccounts(contractAddress: string, limit?: number, start_after?: string): Promise<string>;
101
+ getMarketingInfo(contractAddress: string): Promise<Cw20MarketingInfo>;
16
102
  getDownloadLogo(contractAddress: string): Promise<string>;
17
103
  }