stackswap-front-api-test-02 1.2.5 → 1.2.6

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.
@@ -43,7 +43,7 @@ class PoxlManager {
43
43
  await (0, transactions_1.callReadOnlyFunction)((0, util_1.getReadOptions)(this.stackswap, contract_address, 'get-random-uint-at-block', [(0, transactions_1.uintCV)(input)]));
44
44
  }
45
45
  async getMinedBlock(contract_address, offset) {
46
- const get_result = await axios_1.default.get(this.stackswap.config.STACKS_API_URL() + '/extended/v1/address/' + this.stackswap.getSenderAddress() + '/transactions', {
46
+ const get_result = await axios_1.default.get(this.stackswap.config.STACKS_API_URL() + '/extended/v2/address/' + this.stackswap.getSenderAddress() + '/transactions', {
47
47
  params: {
48
48
  limit: 40,
49
49
  offset,
@@ -110,7 +110,7 @@ class StakingManager {
110
110
  }
111
111
  async getRewardRoundID(offset) {
112
112
  const ADDR = this.stackswap.config.STACKSWAP_ADDRESS() + '.' + this.stackswap.config.CONTRACT_NAME_STACKSWAP_STSW_STACKING_LOGIC_V2();
113
- const get_result = await axios_1.default.get(this.stackswap.config.STACKS_API_URL() + '/extended/v1/address/' + this.stackswap.getSenderAddress() + '/transactions', {
113
+ const get_result = await axios_1.default.get(this.stackswap.config.STACKS_API_URL() + '/extended/v2/address/' + this.stackswap.getSenderAddress() + '/transactions', {
114
114
  params: {
115
115
  limit: 50,
116
116
  offset,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stackswap-front-api-test-02",
3
- "version": "1.2.5",
3
+ "version": "1.2.6",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "start": "tsc -b tsconfig.build.json --watch --verbose",
package/src/index.ts CHANGED
@@ -119,13 +119,13 @@ export class StackswapMainnetAPI implements StackswapAPI{
119
119
 
120
120
  getCurrentBlock: () => Promise<any> = async () => {
121
121
  //https://stacks-node-api.mainnet.stacks.co/extended/v1/block?limit=0
122
- const get_result = await axios.get(this.config.STACKS_API_URL() + '/extended/v1/block?limit=1');
122
+ const get_result = await axios.get(this.config.STACKS_API_URL() + '/extended/v2/block?limit=1');
123
123
  return get_result.data.total;
124
124
  };
125
125
 
126
126
  // @ts-ignore
127
127
  async getCurrentBlocks() {
128
- const get_result = await axios.get(this.config.STACKS_API_URL() + '/extended/v1/block?limit=1');
128
+ const get_result = await axios.get(this.config.STACKS_API_URL() + '/extended/v2/block?limit=1');
129
129
  return {block_height : get_result.data.results[0].height, burn_block_height : get_result.data.results[0].burn_block_height};
130
130
  }
131
131
 
@@ -52,7 +52,7 @@ export class PoxlManager {
52
52
  }
53
53
 
54
54
  async getMinedBlock( contract_address: string, offset: number) {
55
- const get_result = await axios.get( this.stackswap.config.STACKS_API_URL() + '/extended/v1/address/' + this.stackswap.getSenderAddress() + '/transactions', {
55
+ const get_result = await axios.get( this.stackswap.config.STACKS_API_URL() + '/extended/v2/address/' + this.stackswap.getSenderAddress() + '/transactions', {
56
56
  params: {
57
57
  limit: 40,
58
58
  offset,
@@ -141,7 +141,7 @@ export class StakingManager {
141
141
 
142
142
  async getRewardRoundID(offset: number) {
143
143
  const ADDR = this.stackswap.config.STACKSWAP_ADDRESS()+'.'+this.stackswap.config.CONTRACT_NAME_STACKSWAP_STSW_STACKING_LOGIC_V2();
144
- const get_result = await axios.get(this.stackswap.config.STACKS_API_URL() + '/extended/v1/address/' + this.stackswap.getSenderAddress() + '/transactions', {
144
+ const get_result = await axios.get(this.stackswap.config.STACKS_API_URL() + '/extended/v2/address/' + this.stackswap.getSenderAddress() + '/transactions', {
145
145
  params: {
146
146
  limit: 50,
147
147
  offset,