@ref-finance/ref-sdk 1.3.4 → 1.3.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.
package/README.md CHANGED
@@ -70,13 +70,15 @@ export function getConfig(
70
70
 
71
71
 
72
72
 
73
- Also, the SDK provides `init_env` to switch application environment. We'd better call it at the entrance of the application, then the entire application environment switch takes effect. If you're not sure where to call, you can call in more than one place.
73
+ Also, the SDK provides `init_env` to switch application environment. there is an optional parameter indexerUrl that you can use to replace the one in the SDK with your own deployed indexer service. We'd better call it at the entrance of the application, then the entire application environment switch takes effect. If you're not sure where to call, you can call in more than one place.
74
74
 
75
75
  Example
76
76
 
77
77
  ```
78
78
  init_env('testnet');
79
79
  init_env('mainnet');
80
+ init_env('testnet', 'https://xx-xx.xx-xxx.com');
81
+ init_env('mainnet', 'https://xx-xx.xx-xxx.com');
80
82
  ```
81
83
 
82
84
 
@@ -54,7 +54,7 @@ function getConfig(env, indexerUrl) {
54
54
  WRAP_NEAR_CONTRACT_ID: 'wrap.near',
55
55
  REF_FI_CONTRACT_ID: 'v2.ref-finance.near',
56
56
  REF_TOKEN_ID: 'token.v2.ref-finance.near',
57
- indexerUrl: indexerUrl || 'https://mainnet-indexer.ref-finance.com',
57
+ indexerUrl: indexerUrl || 'https://indexer.ref.finance',
58
58
  explorerUrl: 'https://testnet.nearblocks.io',
59
59
  REF_DCL_SWAP_CONTRACT_ID: 'dclv2.ref-labs.near'
60
60
  };
@@ -70,6 +70,18 @@ function getConfig(env, indexerUrl) {
70
70
  explorerUrl: 'https://testnet.nearblocks.io',
71
71
  REF_DCL_SWAP_CONTRACT_ID: 'dclv2.ref-dev.testnet'
72
72
  };
73
+ case 'dev':
74
+ return {
75
+ networkId: 'testnet',
76
+ nodeUrl: 'https://rpc.testnet.near.org',
77
+ walletUrl: 'https://wallet.testnet.near.org',
78
+ indexerUrl: indexerUrl || 'https://dev-indexer.ref-finance.com',
79
+ WRAP_NEAR_CONTRACT_ID: 'wrap.testnet',
80
+ REF_FI_CONTRACT_ID: 'exchange.ref-dev.testnet',
81
+ REF_TOKEN_ID: 'ref.fakes.testnet',
82
+ explorerUrl: 'https://testnet.nearblocks.io',
83
+ REF_DCL_SWAP_CONTRACT_ID: 'refv2-dev.ref-dev.testnet'
84
+ };
73
85
  default:
74
86
  return {
75
87
  networkId: 'mainnet',
@@ -78,7 +90,7 @@ function getConfig(env, indexerUrl) {
78
90
  REF_FI_CONTRACT_ID: 'v2.ref-finance.near',
79
91
  WRAP_NEAR_CONTRACT_ID: 'wrap.near',
80
92
  REF_TOKEN_ID: 'token.v2.ref-finance.near',
81
- indexerUrl: indexerUrl || 'https://mainnet-indexer.ref-finance.com',
93
+ indexerUrl: indexerUrl || 'https://indexer.ref.finance',
82
94
  explorerUrl: 'https://nearblocks.io',
83
95
  REF_DCL_SWAP_CONTRACT_ID: 'dclv2.ref-labs.near'
84
96
  };
@@ -7537,6 +7549,24 @@ var DefaultMainnetTokenList = [{
7537
7549
  reference_hash: null,
7538
7550
  decimals: 6,
7539
7551
  id: 'usdt.tether-token.near'
7552
+ }, {
7553
+ spec: 'ft-1.0.0',
7554
+ name: 'NEAT',
7555
+ symbol: 'NEAT',
7556
+ icon: "data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='40' height='40' rx='4.8' fill='%23202020'/%3E%3Crect width='40' height='40' rx='4.8' fill='url(%23paint0_linear_1_5571)'/%3E%3Crect x='10.4' y='12.6001' width='4.8' height='4.8' fill='white'/%3E%3Crect x='15.2' y='12.6001' width='4.8' height='4.8' fill='white'/%3E%3Crect x='24.8' y='12.6001' width='4.8' height='4.8' fill='white'/%3E%3Crect x='10.4' y='17.4001' width='4.8' height='4.8' fill='white'/%3E%3Crect x='24.8' y='17.4001' width='4.8' height='4.8' fill='white'/%3E%3Crect x='10.4' y='22.2002' width='4.8' height='4.8' fill='white'/%3E%3Crect x='24.8' y='22.2002' width='4.8' height='4.8' fill='white'/%3E%3Crect x='20' y='22.2002' width='4.8' height='4.8' fill='white'/%3E%3Crect x='17.6' y='17.4001' width='4.8' height='4.8' fill='white'/%3E%3Cdefs%3E%3ClinearGradient id='paint0_linear_1_5571' x1='20' y1='0' x2='20' y2='40' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23262626'/%3E%3Cstop offset='1' stop-color='%23121212'/%3E%3C/linearGradient%3E%3C/defs%3E%3C/svg%3E%0A",
7557
+ reference: null,
7558
+ reference_hash: null,
7559
+ decimals: 8,
7560
+ id: 'neat.nrc-20.near'
7561
+ }, {
7562
+ spec: 'ft-1.0.0',
7563
+ name: 'USMeme',
7564
+ symbol: 'USM',
7565
+ icon: 'https://storage.herewallet.app/upload/13151331-8f9c-4851-8038-36794688c693.jpg',
7566
+ reference: null,
7567
+ reference_hash: null,
7568
+ decimals: 8,
7569
+ id: 'usmeme.tg'
7540
7570
  }];
7541
7571
  function getDefaultTokenList() {
7542
7572
  var env = getConfig().networkId;