mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-02-06 06:54:58 +00:00
Add DEFAULT_JSONRPC2_URL variable to lib/jsonrpc2.js
This commit is contained in:
parent
638b172e77
commit
58e9bdc4ab
|
@ -2,9 +2,10 @@
|
|||
// JSON-RPC 2.0 wrapper for WelsonJS framework
|
||||
// Namhyeon Go <abuse@catswords.net>
|
||||
// https://github.com/gnh1201/welsonjs
|
||||
//
|
||||
function JsonRpc2(url) {
|
||||
this.url = url;
|
||||
this.userAgent = "php-httpproxy/0.1.5 (Client; WelsonJS; abuse@catswords.net)";
|
||||
this.userAgent = "php-httpproxy/0.1.5 (Client; WelsonJS)";
|
||||
|
||||
this.setUserAgent = function(agent) {
|
||||
this.userAgent = agent;
|
||||
|
@ -48,10 +49,14 @@ function create(url) {
|
|||
return new JsonRpc2(url);
|
||||
}
|
||||
|
||||
var DEFAULT_JSONRPC2_URL = "https://azure-ashlan-40.tiiny.io/";
|
||||
|
||||
exports.wrap = wrap;
|
||||
exports.create = create;
|
||||
|
||||
exports.VERSIONINFO = "JSON-RPC 2.0 wrapper (jsonrpc2.js) version 0.1.4";
|
||||
exports.DEFAULT_JSONRPC2_URL = DEFAULT_JSONRPC2_URL;
|
||||
|
||||
exports.VERSIONINFO = "JSON-RPC 2.0 wrapper (jsonrpc2.js) version 0.1.5";
|
||||
exports.AUTHOR = "abuse@catswords.net";
|
||||
exports.global = global;
|
||||
exports.require = global.require;
|
||||
|
|
|
@ -9,10 +9,8 @@
|
|||
//
|
||||
var JsonRpc2 = require("lib/jsonrpc2");
|
||||
|
||||
var API_URL = "https://azure-ashlan-40.tiiny.io/";
|
||||
|
||||
function encode(s) {
|
||||
var rpc = JsonRpc2.create(API_URL);
|
||||
var rpc = JsonRpc2.create(JsonRpc2.DEFAULT_JSONRPC2_URL);
|
||||
var result = rpc.invoke("relay_invoke_method", {
|
||||
"callback": "load_script",
|
||||
"requires": [
|
||||
|
@ -27,7 +25,7 @@ function encode(s) {
|
|||
}
|
||||
|
||||
function decode(s) {
|
||||
var rpc = JsonRpc2.create(API_URL);
|
||||
var rpc = JsonRpc2.create(JsonRpc2.DEFAULT_JSONRPC2_URL);
|
||||
var result = rpc.invoke("relay_invoke_method", {
|
||||
"callback": "load_script",
|
||||
"requires": [
|
||||
|
@ -44,7 +42,7 @@ function decode(s) {
|
|||
exports.encode = encode;
|
||||
exports.decode = decode;
|
||||
|
||||
exports.VERSIONINFO = "Punycode Public API client (punycode.js) version 0.2.2";
|
||||
exports.VERSIONINFO = "Punycode Public API client (punycode.js) version 0.2.3";
|
||||
exports.AUTHOR = "abuse@catswords.net";
|
||||
exports.global = global;
|
||||
exports.require = global.require;
|
||||
|
|
|
@ -10,10 +10,8 @@
|
|||
//
|
||||
var JsonRpc2 = require("lib/jsonrpc2");
|
||||
|
||||
var API_URL = "https://azure-ashlan-40.tiiny.io/";
|
||||
|
||||
function getPubKey() {
|
||||
var rpc = JsonRpc2.create(API_URL);
|
||||
var rpc = JsonRpc2.create(JsonRpc2.DEFAULT_JSONRPC2_URL);
|
||||
var result = rpc.invoke("relay_invoke_method", {
|
||||
"callback": "load_script",
|
||||
"requires": [
|
||||
|
@ -28,7 +26,7 @@ function getPubKey() {
|
|||
}
|
||||
|
||||
function getOtp(pubkey) {
|
||||
var rpc = JsonRpc2.create(API_URL);
|
||||
var rpc = JsonRpc2.create(JsonRpc2.DEFAULT_JSONRPC2_URL);
|
||||
var result = rpc.invoke("relay_invoke_method", {
|
||||
"callback": "load_script",
|
||||
"requires": [
|
||||
|
@ -45,7 +43,7 @@ function getOtp(pubkey) {
|
|||
exports.getPubKey = getPubKey;
|
||||
exports.getOtp = getOtp;
|
||||
|
||||
exports.VERSIONINFO = "TOTP library (totp.js) version 0.1.6";
|
||||
exports.VERSIONINFO = "TOTP library (totp.js) version 0.1.7";
|
||||
exports.AUTHOR = "abuse@catswords.net";
|
||||
exports.global = global;
|
||||
exports.require = global.require;
|
||||
|
|
Loading…
Reference in New Issue
Block a user