@human.tech/waap-constants 0.0.1
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 +35 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/index.modern.mjs +2 -0
- package/dist/index.modern.mjs.map +1 -0
- package/dist/index.module.js +2 -0
- package/dist/index.module.js.map +1 -0
- package/dist/index.umd.js +2 -0
- package/dist/index.umd.js.map +1 -0
- package/package.json +43 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { JSON_RPC_METHOD } from '@silk-wallet/silk-interface-core';
|
|
2
|
+
export declare const silkWalletAppOrigin: string;
|
|
3
|
+
export declare const silkWalletAppOrigin2Staging = "https://staging.waap.xyz";
|
|
4
|
+
export declare const authServerOrigin: string;
|
|
5
|
+
export declare const wsRelayOrigin: string;
|
|
6
|
+
export declare const silkWalletAppOrigin2Prod = "https://waap.xyz";
|
|
7
|
+
export declare const silkWalletAppOrigin2: string;
|
|
8
|
+
export declare const silkAdminAppOrigin: string;
|
|
9
|
+
export declare const silkDemoAppOrigin: string;
|
|
10
|
+
export declare const silkDevPortalOrigin: string;
|
|
11
|
+
export declare const silkMfaServerOrigin: string;
|
|
12
|
+
export declare const silkPolicyEngineOrigin: string;
|
|
13
|
+
export declare const silkKeyshareManagerOrigin: string;
|
|
14
|
+
export declare const silkProtectorMainOrigin: string;
|
|
15
|
+
export declare const recoveryEmailAddress = "test@recovery.silk.sc";
|
|
16
|
+
export declare const fieldOrder = "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141";
|
|
17
|
+
export declare const rpcMethodRequiresUI: (method: JSON_RPC_METHOD) => boolean;
|
|
18
|
+
export declare const rpcMethodRequiresUIMap: {
|
|
19
|
+
eth_sendTransaction: boolean;
|
|
20
|
+
personal_sign: boolean;
|
|
21
|
+
eth_signTypedData_v4: boolean;
|
|
22
|
+
eth_getBalance: boolean;
|
|
23
|
+
eth_requestAccounts: boolean;
|
|
24
|
+
eth_accounts: boolean;
|
|
25
|
+
eth_chainId: boolean;
|
|
26
|
+
net_version: boolean;
|
|
27
|
+
wallet_switchEthereumChain: boolean;
|
|
28
|
+
wallet_addEthereumChain: boolean;
|
|
29
|
+
eth_estimateGas: boolean;
|
|
30
|
+
eth_blockNumber: boolean;
|
|
31
|
+
eth_getCode: boolean;
|
|
32
|
+
eth_call: boolean;
|
|
33
|
+
eth_getTransactionReceipt: boolean;
|
|
34
|
+
eth_getTransactionByHash: boolean;
|
|
35
|
+
};
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e,t=require("@silk-wallet/silk-interface-core"),r=process.env.NEXT_PUBLIC_WS_RELAY_ORIGIN||"https://waap-ws-relay-ams.fly.dev",s="https://waap.xyz",i=s,p=((e={})[t.JSON_RPC_METHOD.eth_sendTransaction]=!0,e[t.JSON_RPC_METHOD.personal_sign]=!0,e[t.JSON_RPC_METHOD.eth_signTypedData_v4]=!0,e[t.JSON_RPC_METHOD.eth_getBalance]=!1,e[t.JSON_RPC_METHOD.eth_requestAccounts]=!1,e[t.JSON_RPC_METHOD.eth_accounts]=!1,e[t.JSON_RPC_METHOD.eth_chainId]=!1,e[t.JSON_RPC_METHOD.net_version]=!1,e[t.JSON_RPC_METHOD.wallet_switchEthereumChain]=!1,e[t.JSON_RPC_METHOD.wallet_addEthereumChain]=!1,e[t.JSON_RPC_METHOD.eth_estimateGas]=!1,e[t.JSON_RPC_METHOD.eth_blockNumber]=!1,e[t.JSON_RPC_METHOD.eth_getCode]=!1,e[t.JSON_RPC_METHOD.eth_call]=!1,e[t.JSON_RPC_METHOD.eth_getTransactionReceipt]=!1,e[t.JSON_RPC_METHOD.eth_getTransactionByHash]=!1,e);exports.authServerOrigin="https://auth.waap.xyz",exports.fieldOrder="0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141",exports.recoveryEmailAddress="test@recovery.silk.sc",exports.rpcMethodRequiresUI=function(e){return p[e]},exports.rpcMethodRequiresUIMap=p,exports.silkAdminAppOrigin="https://dashboard.silk.sc",exports.silkDemoAppOrigin="https://silk-demo-app.vercel.app",exports.silkDevPortalOrigin="https://silk-dev-portal-vercel-holonymid-holonym.vercel.app/",exports.silkKeyshareManagerOrigin="https://silk-protector-microservice-km.com",exports.silkMfaServerOrigin="https://server.silkwallet.net",exports.silkPolicyEngineOrigin="https://silk-protector-microservice-pe.com",exports.silkProtectorMainOrigin="https://main.silk-protector.com",exports.silkWalletAppOrigin="https://silksecure.net",exports.silkWalletAppOrigin2=i,exports.silkWalletAppOrigin2Prod=s,exports.silkWalletAppOrigin2Staging="https://staging.waap.xyz",exports.wsRelayOrigin=r;
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import { JSON_RPC_METHOD } from '@silk-wallet/silk-interface-core'\n\n// See the \"build\" and \"dev\" scripts in package.json. During build, we replace these\n// env vars with the value \"production\". For development, we do not replace them with\n// anything, allowing the package consumer (e.g., silk-next-app) to set them.\nconst silkNodeEnv =\n process.env.SILK_NODE_ENV ?? process.env.NEXT_PUBLIC_SILK_NODE_ENV\n\nexport const silkWalletAppOrigin =\n silkNodeEnv === 'production'\n ? 'https://silksecure.net'\n : 'http://127.0.0.1:3000'\nexport const silkWalletAppOrigin2Staging = 'https://staging.waap.xyz'\nexport const authServerOrigin =\n silkNodeEnv === 'production'\n ? 'https://auth.waap.xyz'\n : silkNodeEnv === 'staging'\n ? 'https://staging.human-wallet.com'\n : 'https://localhost:8000'\n\n// WebSocket relay origin for auth completion notifications\nexport const wsRelayOrigin =\n silkNodeEnv === 'production'\n ? process.env.NEXT_PUBLIC_WS_RELAY_ORIGIN ||\n 'https://waap-ws-relay-ams.fly.dev'\n : silkNodeEnv === 'staging'\n ? process.env.NEXT_PUBLIC_WS_RELAY_ORIGIN ||\n 'https://staging-waap-ws-relay.fly.dev'\n : process.env.NEXT_PUBLIC_WS_RELAY_ORIGIN || 'ws://127.0.0.1:8081'\n// export const silkWalletAppOrigin2Prod = 'https://humansignon.com'\nexport const silkWalletAppOrigin2Prod = 'https://waap.xyz'\nexport const silkWalletAppOrigin2 =\n silkNodeEnv === 'production'\n ? silkWalletAppOrigin2Prod\n : silkNodeEnv === 'staging'\n ? silkWalletAppOrigin2Staging\n : 'http://127.0.0.1:3000'\nexport const silkAdminAppOrigin =\n silkNodeEnv === 'production'\n ? 'https://dashboard.silk.sc'\n : 'http://127.0.0.1:3002'\nexport const silkDemoAppOrigin =\n silkNodeEnv === 'production'\n ? 'https://silk-demo-app.vercel.app'\n : 'http://127.0.0.1:3001'\nexport const silkDevPortalOrigin =\n silkNodeEnv === 'development' || !silkNodeEnv\n ? 'http://localhost:3001'\n : 'https://silk-dev-portal-vercel-holonymid-holonym.vercel.app/'\nexport const silkMfaServerOrigin =\n silkNodeEnv === 'production'\n ? 'https://server.silkwallet.net'\n : 'http://0.0.0.0:3003'\nexport const silkPolicyEngineOrigin =\n silkNodeEnv === 'production'\n ? 'https://silk-protector-microservice-pe.com'\n : silkNodeEnv === 'staging'\n ? 'https://policyengine.staging.silk-protector.com'\n : 'http://127.0.0.1:3003'\nexport const silkKeyshareManagerOrigin =\n silkNodeEnv === 'production'\n ? 'https://silk-protector-microservice-km.com'\n : silkNodeEnv === 'staging'\n ? 'https://keyshare-manager.staging.silk-protector.com'\n : 'http://127.0.0.1:3004'\nexport const silkProtectorMainOrigin =\n silkNodeEnv === 'production'\n ? 'https://main.silk-protector.com'\n : silkNodeEnv === 'staging'\n ? 'https://protector-main.staging.silk-protector.com'\n : 'http://127.0.0.1:3005'\nexport const recoveryEmailAddress = 'test@recovery.silk.sc'\n\nexport const fieldOrder =\n '0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141'\n\nexport const rpcMethodRequiresUI = (method: JSON_RPC_METHOD) =>\n rpcMethodRequiresUIMap[method]\nexport const rpcMethodRequiresUIMap = {\n // Requires user interaction\n [JSON_RPC_METHOD.eth_sendTransaction]: true,\n [JSON_RPC_METHOD.personal_sign]: true,\n [JSON_RPC_METHOD.eth_signTypedData_v4]: true,\n // Does not require user interaction\n [JSON_RPC_METHOD.eth_getBalance]: false,\n [JSON_RPC_METHOD.eth_requestAccounts]: false,\n [JSON_RPC_METHOD.eth_accounts]: false,\n [JSON_RPC_METHOD.eth_chainId]: false,\n [JSON_RPC_METHOD.net_version]: false,\n [JSON_RPC_METHOD.wallet_switchEthereumChain]: false,\n [JSON_RPC_METHOD.wallet_addEthereumChain]: false,\n [JSON_RPC_METHOD.eth_estimateGas]: false,\n [JSON_RPC_METHOD.eth_blockNumber]: false,\n [JSON_RPC_METHOD.eth_getCode]: false,\n [JSON_RPC_METHOD.eth_call]: false,\n [JSON_RPC_METHOD.eth_getTransactionReceipt]: false,\n [JSON_RPC_METHOD.eth_getTransactionByHash]: false\n}\n"],"names":["wsRelayOrigin","process","env","NEXT_PUBLIC_WS_RELAY_ORIGIN","silkWalletAppOrigin2Prod","silkWalletAppOrigin2","rpcMethodRequiresUIMap","_rpcMethodRequiresUIM","JSON_RPC_METHOD","eth_sendTransaction","personal_sign","eth_signTypedData_v4","eth_getBalance","eth_requestAccounts","eth_accounts","eth_chainId","net_version","wallet_switchEthereumChain","wallet_addEthereumChain","eth_estimateGas","eth_blockNumber","eth_getCode","eth_call","eth_getTransactionReceipt","eth_getTransactionByHash","method","silkNodeEnv"],"mappings":"oDAqBaA,EAEPC,QAAQC,IAAIC,6BACZ,oCAMOC,EAA2B,mBAC3BC,EAEPD,EA6COE,IAAsBC,EAAAA,CAAAA,GAEhCC,kBAAgBC,sBAAsB,EAAIF,EAC1CC,EAAeA,gBAACE,gBAAgB,EAAIH,EACpCC,EAAeA,gBAACG,uBAAuB,EAAIJ,EAE3CC,EAAeA,gBAACI,iBAAiB,EAAKL,EACtCC,EAAeA,gBAACK,sBAAsB,EAAKN,EAC3CC,EAAeA,gBAACM,eAAe,EAAKP,EACpCC,EAAAA,gBAAgBO,cAAc,EAAKR,EACnCC,EAAAA,gBAAgBQ,cAAc,EAAKT,EACnCC,EAAAA,gBAAgBS,6BAA6B,EAAKV,EAClDC,EAAAA,gBAAgBU,0BAA0B,EAAKX,EAC/CC,EAAAA,gBAAgBW,kBAAkB,EAAKZ,EACvCC,kBAAgBY,kBAAkB,EAAKb,EACvCC,kBAAgBa,cAAc,EAAKd,EACnCC,kBAAgBc,WAAW,EAAKf,EAChCC,kBAAgBe,4BAA4B,EAAKhB,EACjDC,kBAAgBgB,2BAA2B,EAAKjB,4BAjF7C,2CA2DJ,kGAHkC,oDAKD,SAACkB,GAAuB,OACzDnB,EAAuBmB,EAAO,8DAtC1B,sDAIA,+DAGJC,iGAeI,yEAVA,+DAIA,6EAYA,8DAzDA,+HAEqC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{JSON_RPC_METHOD as t}from"@silk-wallet/silk-interface-core";const e="https://silksecure.net",s="https://staging.waap.xyz",a="https://auth.waap.xyz",r=process.env.NEXT_PUBLIC_WS_RELAY_ORIGIN||"https://waap-ws-relay-ams.fly.dev",h="https://waap.xyz",c=h,o="https://dashboard.silk.sc",p="https://silk-demo-app.vercel.app",F="https://silk-dev-portal-vercel-holonymid-holonym.vercel.app/",i="https://server.silkwallet.net",l="https://silk-protector-microservice-pe.com",n="https://silk-protector-microservice-km.com",_="https://main.silk-protector.com",m="test@recovery.silk.sc",k="0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141",d=t=>v[t],v={[t.eth_sendTransaction]:!0,[t.personal_sign]:!0,[t.eth_signTypedData_v4]:!0,[t.eth_getBalance]:!1,[t.eth_requestAccounts]:!1,[t.eth_accounts]:!1,[t.eth_chainId]:!1,[t.net_version]:!1,[t.wallet_switchEthereumChain]:!1,[t.wallet_addEthereumChain]:!1,[t.eth_estimateGas]:!1,[t.eth_blockNumber]:!1,[t.eth_getCode]:!1,[t.eth_call]:!1,[t.eth_getTransactionReceipt]:!1,[t.eth_getTransactionByHash]:!1};export{a as authServerOrigin,k as fieldOrder,m as recoveryEmailAddress,d as rpcMethodRequiresUI,v as rpcMethodRequiresUIMap,o as silkAdminAppOrigin,p as silkDemoAppOrigin,F as silkDevPortalOrigin,n as silkKeyshareManagerOrigin,i as silkMfaServerOrigin,l as silkPolicyEngineOrigin,_ as silkProtectorMainOrigin,e as silkWalletAppOrigin,c as silkWalletAppOrigin2,h as silkWalletAppOrigin2Prod,s as silkWalletAppOrigin2Staging,r as wsRelayOrigin};
|
|
2
|
+
//# sourceMappingURL=index.modern.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.modern.mjs","sources":["../src/index.ts"],"sourcesContent":["import { JSON_RPC_METHOD } from '@silk-wallet/silk-interface-core'\n\n// See the \"build\" and \"dev\" scripts in package.json. During build, we replace these\n// env vars with the value \"production\". For development, we do not replace them with\n// anything, allowing the package consumer (e.g., silk-next-app) to set them.\nconst silkNodeEnv =\n process.env.SILK_NODE_ENV ?? process.env.NEXT_PUBLIC_SILK_NODE_ENV\n\nexport const silkWalletAppOrigin =\n silkNodeEnv === 'production'\n ? 'https://silksecure.net'\n : 'http://127.0.0.1:3000'\nexport const silkWalletAppOrigin2Staging = 'https://staging.waap.xyz'\nexport const authServerOrigin =\n silkNodeEnv === 'production'\n ? 'https://auth.waap.xyz'\n : silkNodeEnv === 'staging'\n ? 'https://staging.human-wallet.com'\n : 'https://localhost:8000'\n\n// WebSocket relay origin for auth completion notifications\nexport const wsRelayOrigin =\n silkNodeEnv === 'production'\n ? process.env.NEXT_PUBLIC_WS_RELAY_ORIGIN ||\n 'https://waap-ws-relay-ams.fly.dev'\n : silkNodeEnv === 'staging'\n ? process.env.NEXT_PUBLIC_WS_RELAY_ORIGIN ||\n 'https://staging-waap-ws-relay.fly.dev'\n : process.env.NEXT_PUBLIC_WS_RELAY_ORIGIN || 'ws://127.0.0.1:8081'\n// export const silkWalletAppOrigin2Prod = 'https://humansignon.com'\nexport const silkWalletAppOrigin2Prod = 'https://waap.xyz'\nexport const silkWalletAppOrigin2 =\n silkNodeEnv === 'production'\n ? silkWalletAppOrigin2Prod\n : silkNodeEnv === 'staging'\n ? silkWalletAppOrigin2Staging\n : 'http://127.0.0.1:3000'\nexport const silkAdminAppOrigin =\n silkNodeEnv === 'production'\n ? 'https://dashboard.silk.sc'\n : 'http://127.0.0.1:3002'\nexport const silkDemoAppOrigin =\n silkNodeEnv === 'production'\n ? 'https://silk-demo-app.vercel.app'\n : 'http://127.0.0.1:3001'\nexport const silkDevPortalOrigin =\n silkNodeEnv === 'development' || !silkNodeEnv\n ? 'http://localhost:3001'\n : 'https://silk-dev-portal-vercel-holonymid-holonym.vercel.app/'\nexport const silkMfaServerOrigin =\n silkNodeEnv === 'production'\n ? 'https://server.silkwallet.net'\n : 'http://0.0.0.0:3003'\nexport const silkPolicyEngineOrigin =\n silkNodeEnv === 'production'\n ? 'https://silk-protector-microservice-pe.com'\n : silkNodeEnv === 'staging'\n ? 'https://policyengine.staging.silk-protector.com'\n : 'http://127.0.0.1:3003'\nexport const silkKeyshareManagerOrigin =\n silkNodeEnv === 'production'\n ? 'https://silk-protector-microservice-km.com'\n : silkNodeEnv === 'staging'\n ? 'https://keyshare-manager.staging.silk-protector.com'\n : 'http://127.0.0.1:3004'\nexport const silkProtectorMainOrigin =\n silkNodeEnv === 'production'\n ? 'https://main.silk-protector.com'\n : silkNodeEnv === 'staging'\n ? 'https://protector-main.staging.silk-protector.com'\n : 'http://127.0.0.1:3005'\nexport const recoveryEmailAddress = 'test@recovery.silk.sc'\n\nexport const fieldOrder =\n '0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141'\n\nexport const rpcMethodRequiresUI = (method: JSON_RPC_METHOD) =>\n rpcMethodRequiresUIMap[method]\nexport const rpcMethodRequiresUIMap = {\n // Requires user interaction\n [JSON_RPC_METHOD.eth_sendTransaction]: true,\n [JSON_RPC_METHOD.personal_sign]: true,\n [JSON_RPC_METHOD.eth_signTypedData_v4]: true,\n // Does not require user interaction\n [JSON_RPC_METHOD.eth_getBalance]: false,\n [JSON_RPC_METHOD.eth_requestAccounts]: false,\n [JSON_RPC_METHOD.eth_accounts]: false,\n [JSON_RPC_METHOD.eth_chainId]: false,\n [JSON_RPC_METHOD.net_version]: false,\n [JSON_RPC_METHOD.wallet_switchEthereumChain]: false,\n [JSON_RPC_METHOD.wallet_addEthereumChain]: false,\n [JSON_RPC_METHOD.eth_estimateGas]: false,\n [JSON_RPC_METHOD.eth_blockNumber]: false,\n [JSON_RPC_METHOD.eth_getCode]: false,\n [JSON_RPC_METHOD.eth_call]: false,\n [JSON_RPC_METHOD.eth_getTransactionReceipt]: false,\n [JSON_RPC_METHOD.eth_getTransactionByHash]: false\n}\n"],"names":["silkWalletAppOrigin","silkWalletAppOrigin2Staging","authServerOrigin","wsRelayOrigin","process","env","NEXT_PUBLIC_WS_RELAY_ORIGIN","silkWalletAppOrigin2Prod","silkWalletAppOrigin2","silkAdminAppOrigin","silkDemoAppOrigin","silkDevPortalOrigin","silkMfaServerOrigin","silkPolicyEngineOrigin","silkKeyshareManagerOrigin","silkProtectorMainOrigin","recoveryEmailAddress","fieldOrder","rpcMethodRequiresUI","method","rpcMethodRequiresUIMap","JSON_RPC_METHOD","eth_sendTransaction","personal_sign","eth_signTypedData_v4","eth_getBalance","eth_requestAccounts","eth_accounts","eth_chainId","net_version","wallet_switchEthereumChain","wallet_addEthereumChain","eth_estimateGas","eth_blockNumber","eth_getCode","eth_call","eth_getTransactionReceipt","eth_getTransactionByHash"],"mappings":"mEAKA,MAGaA,EAEP,yBAEOC,EAA8B,2BAC9BC,EAEP,wBAMOC,EAEPC,QAAQC,IAAIC,6BACZ,oCAMOC,EAA2B,mBAC3BC,EAEPD,EAIOE,EAEP,4BAEOC,EAEP,mCAEOC,EAGP,+DACOC,EAEP,gCAEOC,EAEP,6CAIOC,EAEP,6CAIOC,EAEP,kCAIOC,EAAuB,wBAEvBC,EACX,qEAEWC,EAAuBC,GAClCC,EAAuBD,GACZC,EAAyB,CAEpC,CAACC,EAAgBC,sBAAsB,EACvC,CAACD,EAAgBE,gBAAgB,EACjC,CAACF,EAAgBG,uBAAuB,EAExC,CAACH,EAAgBI,iBAAiB,EAClC,CAACJ,EAAgBK,sBAAsB,EACvC,CAACL,EAAgBM,eAAe,EAChC,CAACN,EAAgBO,cAAc,EAC/B,CAACP,EAAgBQ,cAAc,EAC/B,CAACR,EAAgBS,6BAA6B,EAC9C,CAACT,EAAgBU,0BAA0B,EAC3C,CAACV,EAAgBW,kBAAkB,EACnC,CAACX,EAAgBY,kBAAkB,EACnC,CAACZ,EAAgBa,cAAc,EAC/B,CAACb,EAAgBc,WAAW,EAC5B,CAACd,EAAgBe,4BAA4B,EAC7C,CAACf,EAAgBgB,2BAA2B"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{JSON_RPC_METHOD as t}from"@silk-wallet/silk-interface-core";var e,s="https://silksecure.net",a="https://staging.waap.xyz",r="https://auth.waap.xyz",h=process.env.NEXT_PUBLIC_WS_RELAY_ORIGIN||"https://waap-ws-relay-ams.fly.dev",c="https://waap.xyz",o=c,i="https://dashboard.silk.sc",p="https://silk-demo-app.vercel.app",F="https://silk-dev-portal-vercel-holonymid-holonym.vercel.app/",l="https://server.silkwallet.net",n="https://silk-protector-microservice-pe.com",_="https://silk-protector-microservice-km.com",m="https://main.silk-protector.com",k="test@recovery.silk.sc",v="0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141",d=function(t){return u[t]},u=((e={})[t.eth_sendTransaction]=!0,e[t.personal_sign]=!0,e[t.eth_signTypedData_v4]=!0,e[t.eth_getBalance]=!1,e[t.eth_requestAccounts]=!1,e[t.eth_accounts]=!1,e[t.eth_chainId]=!1,e[t.net_version]=!1,e[t.wallet_switchEthereumChain]=!1,e[t.wallet_addEthereumChain]=!1,e[t.eth_estimateGas]=!1,e[t.eth_blockNumber]=!1,e[t.eth_getCode]=!1,e[t.eth_call]=!1,e[t.eth_getTransactionReceipt]=!1,e[t.eth_getTransactionByHash]=!1,e);export{r as authServerOrigin,v as fieldOrder,k as recoveryEmailAddress,d as rpcMethodRequiresUI,u as rpcMethodRequiresUIMap,i as silkAdminAppOrigin,p as silkDemoAppOrigin,F as silkDevPortalOrigin,_ as silkKeyshareManagerOrigin,l as silkMfaServerOrigin,n as silkPolicyEngineOrigin,m as silkProtectorMainOrigin,s as silkWalletAppOrigin,o as silkWalletAppOrigin2,c as silkWalletAppOrigin2Prod,a as silkWalletAppOrigin2Staging,h as wsRelayOrigin};
|
|
2
|
+
//# sourceMappingURL=index.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.module.js","sources":["../src/index.ts"],"sourcesContent":["import { JSON_RPC_METHOD } from '@silk-wallet/silk-interface-core'\n\n// See the \"build\" and \"dev\" scripts in package.json. During build, we replace these\n// env vars with the value \"production\". For development, we do not replace them with\n// anything, allowing the package consumer (e.g., silk-next-app) to set them.\nconst silkNodeEnv =\n process.env.SILK_NODE_ENV ?? process.env.NEXT_PUBLIC_SILK_NODE_ENV\n\nexport const silkWalletAppOrigin =\n silkNodeEnv === 'production'\n ? 'https://silksecure.net'\n : 'http://127.0.0.1:3000'\nexport const silkWalletAppOrigin2Staging = 'https://staging.waap.xyz'\nexport const authServerOrigin =\n silkNodeEnv === 'production'\n ? 'https://auth.waap.xyz'\n : silkNodeEnv === 'staging'\n ? 'https://staging.human-wallet.com'\n : 'https://localhost:8000'\n\n// WebSocket relay origin for auth completion notifications\nexport const wsRelayOrigin =\n silkNodeEnv === 'production'\n ? process.env.NEXT_PUBLIC_WS_RELAY_ORIGIN ||\n 'https://waap-ws-relay-ams.fly.dev'\n : silkNodeEnv === 'staging'\n ? process.env.NEXT_PUBLIC_WS_RELAY_ORIGIN ||\n 'https://staging-waap-ws-relay.fly.dev'\n : process.env.NEXT_PUBLIC_WS_RELAY_ORIGIN || 'ws://127.0.0.1:8081'\n// export const silkWalletAppOrigin2Prod = 'https://humansignon.com'\nexport const silkWalletAppOrigin2Prod = 'https://waap.xyz'\nexport const silkWalletAppOrigin2 =\n silkNodeEnv === 'production'\n ? silkWalletAppOrigin2Prod\n : silkNodeEnv === 'staging'\n ? silkWalletAppOrigin2Staging\n : 'http://127.0.0.1:3000'\nexport const silkAdminAppOrigin =\n silkNodeEnv === 'production'\n ? 'https://dashboard.silk.sc'\n : 'http://127.0.0.1:3002'\nexport const silkDemoAppOrigin =\n silkNodeEnv === 'production'\n ? 'https://silk-demo-app.vercel.app'\n : 'http://127.0.0.1:3001'\nexport const silkDevPortalOrigin =\n silkNodeEnv === 'development' || !silkNodeEnv\n ? 'http://localhost:3001'\n : 'https://silk-dev-portal-vercel-holonymid-holonym.vercel.app/'\nexport const silkMfaServerOrigin =\n silkNodeEnv === 'production'\n ? 'https://server.silkwallet.net'\n : 'http://0.0.0.0:3003'\nexport const silkPolicyEngineOrigin =\n silkNodeEnv === 'production'\n ? 'https://silk-protector-microservice-pe.com'\n : silkNodeEnv === 'staging'\n ? 'https://policyengine.staging.silk-protector.com'\n : 'http://127.0.0.1:3003'\nexport const silkKeyshareManagerOrigin =\n silkNodeEnv === 'production'\n ? 'https://silk-protector-microservice-km.com'\n : silkNodeEnv === 'staging'\n ? 'https://keyshare-manager.staging.silk-protector.com'\n : 'http://127.0.0.1:3004'\nexport const silkProtectorMainOrigin =\n silkNodeEnv === 'production'\n ? 'https://main.silk-protector.com'\n : silkNodeEnv === 'staging'\n ? 'https://protector-main.staging.silk-protector.com'\n : 'http://127.0.0.1:3005'\nexport const recoveryEmailAddress = 'test@recovery.silk.sc'\n\nexport const fieldOrder =\n '0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141'\n\nexport const rpcMethodRequiresUI = (method: JSON_RPC_METHOD) =>\n rpcMethodRequiresUIMap[method]\nexport const rpcMethodRequiresUIMap = {\n // Requires user interaction\n [JSON_RPC_METHOD.eth_sendTransaction]: true,\n [JSON_RPC_METHOD.personal_sign]: true,\n [JSON_RPC_METHOD.eth_signTypedData_v4]: true,\n // Does not require user interaction\n [JSON_RPC_METHOD.eth_getBalance]: false,\n [JSON_RPC_METHOD.eth_requestAccounts]: false,\n [JSON_RPC_METHOD.eth_accounts]: false,\n [JSON_RPC_METHOD.eth_chainId]: false,\n [JSON_RPC_METHOD.net_version]: false,\n [JSON_RPC_METHOD.wallet_switchEthereumChain]: false,\n [JSON_RPC_METHOD.wallet_addEthereumChain]: false,\n [JSON_RPC_METHOD.eth_estimateGas]: false,\n [JSON_RPC_METHOD.eth_blockNumber]: false,\n [JSON_RPC_METHOD.eth_getCode]: false,\n [JSON_RPC_METHOD.eth_call]: false,\n [JSON_RPC_METHOD.eth_getTransactionReceipt]: false,\n [JSON_RPC_METHOD.eth_getTransactionByHash]: false\n}\n"],"names":["silkWalletAppOrigin","silkWalletAppOrigin2Staging","authServerOrigin","wsRelayOrigin","process","env","NEXT_PUBLIC_WS_RELAY_ORIGIN","silkWalletAppOrigin2Prod","silkWalletAppOrigin2","silkAdminAppOrigin","silkDemoAppOrigin","silkDevPortalOrigin","silkMfaServerOrigin","silkPolicyEngineOrigin","silkKeyshareManagerOrigin","silkProtectorMainOrigin","recoveryEmailAddress","fieldOrder","rpcMethodRequiresUI","method","rpcMethodRequiresUIMap","_rpcMethodRequiresUIM","JSON_RPC_METHOD","eth_sendTransaction","personal_sign","eth_signTypedData_v4","eth_getBalance","eth_requestAccounts","eth_accounts","eth_chainId","net_version","wallet_switchEthereumChain","wallet_addEthereumChain","eth_estimateGas","eth_blockNumber","eth_getCode","eth_call","eth_getTransactionReceipt","eth_getTransactionByHash"],"mappings":"yEAQaA,EAEP,yBAEOC,EAA8B,2BAC9BC,EAEP,wBAMOC,EAEPC,QAAQC,IAAIC,6BACZ,oCAMOC,EAA2B,mBAC3BC,EAEPD,EAIOE,EAEP,4BAEOC,EAEP,mCAEOC,EAGP,+DACOC,EAEP,gCAEOC,EAEP,6CAIOC,EAEP,6CAIOC,EAEP,kCAIOC,EAAuB,wBAEvBC,EACX,qEAEWC,EAAsB,SAACC,GAAuB,OACzDC,EAAuBD,EAAO,EACnBC,IAAsBC,EAAAA,CAAAA,GAEhCC,EAAgBC,sBAAsB,EAAIF,EAC1CC,EAAgBE,gBAAgB,EAAIH,EACpCC,EAAgBG,uBAAuB,EAAIJ,EAE3CC,EAAgBI,iBAAiB,EAAKL,EACtCC,EAAgBK,sBAAsB,EAAKN,EAC3CC,EAAgBM,eAAe,EAAKP,EACpCC,EAAgBO,cAAc,EAAKR,EACnCC,EAAgBQ,cAAc,EAAKT,EACnCC,EAAgBS,6BAA6B,EAAKV,EAClDC,EAAgBU,0BAA0B,EAAKX,EAC/CC,EAAgBW,kBAAkB,EAAKZ,EACvCC,EAAgBY,kBAAkB,EAAKb,EACvCC,EAAgBa,cAAc,EAAKd,EACnCC,EAAgBc,WAAW,EAAKf,EAChCC,EAAgBe,4BAA4B,EAAKhB,EACjDC,EAAgBgB,2BAA2B,EAAKjB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@silk-wallet/silk-interface-core")):"function"==typeof define&&define.amd?define(["exports","@silk-wallet/silk-interface-core"],t):t((e||self).waapConstants={},e.silkInterfaceCore)}(this,function(e,t){var i,s=process.env.NEXT_PUBLIC_WS_RELAY_ORIGIN||"https://waap-ws-relay-ams.fly.dev",r="https://waap.xyz",a=r,l=((i={})[t.JSON_RPC_METHOD.eth_sendTransaction]=!0,i[t.JSON_RPC_METHOD.personal_sign]=!0,i[t.JSON_RPC_METHOD.eth_signTypedData_v4]=!0,i[t.JSON_RPC_METHOD.eth_getBalance]=!1,i[t.JSON_RPC_METHOD.eth_requestAccounts]=!1,i[t.JSON_RPC_METHOD.eth_accounts]=!1,i[t.JSON_RPC_METHOD.eth_chainId]=!1,i[t.JSON_RPC_METHOD.net_version]=!1,i[t.JSON_RPC_METHOD.wallet_switchEthereumChain]=!1,i[t.JSON_RPC_METHOD.wallet_addEthereumChain]=!1,i[t.JSON_RPC_METHOD.eth_estimateGas]=!1,i[t.JSON_RPC_METHOD.eth_blockNumber]=!1,i[t.JSON_RPC_METHOD.eth_getCode]=!1,i[t.JSON_RPC_METHOD.eth_call]=!1,i[t.JSON_RPC_METHOD.eth_getTransactionReceipt]=!1,i[t.JSON_RPC_METHOD.eth_getTransactionByHash]=!1,i);e.authServerOrigin="https://auth.waap.xyz",e.fieldOrder="0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141",e.recoveryEmailAddress="test@recovery.silk.sc",e.rpcMethodRequiresUI=function(e){return l[e]},e.rpcMethodRequiresUIMap=l,e.silkAdminAppOrigin="https://dashboard.silk.sc",e.silkDemoAppOrigin="https://silk-demo-app.vercel.app",e.silkDevPortalOrigin="https://silk-dev-portal-vercel-holonymid-holonym.vercel.app/",e.silkKeyshareManagerOrigin="https://silk-protector-microservice-km.com",e.silkMfaServerOrigin="https://server.silkwallet.net",e.silkPolicyEngineOrigin="https://silk-protector-microservice-pe.com",e.silkProtectorMainOrigin="https://main.silk-protector.com",e.silkWalletAppOrigin="https://silksecure.net",e.silkWalletAppOrigin2=a,e.silkWalletAppOrigin2Prod=r,e.silkWalletAppOrigin2Staging="https://staging.waap.xyz",e.wsRelayOrigin=s});
|
|
2
|
+
//# sourceMappingURL=index.umd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.umd.js","sources":["../src/index.ts"],"sourcesContent":["import { JSON_RPC_METHOD } from '@silk-wallet/silk-interface-core'\n\n// See the \"build\" and \"dev\" scripts in package.json. During build, we replace these\n// env vars with the value \"production\". For development, we do not replace them with\n// anything, allowing the package consumer (e.g., silk-next-app) to set them.\nconst silkNodeEnv =\n process.env.SILK_NODE_ENV ?? process.env.NEXT_PUBLIC_SILK_NODE_ENV\n\nexport const silkWalletAppOrigin =\n silkNodeEnv === 'production'\n ? 'https://silksecure.net'\n : 'http://127.0.0.1:3000'\nexport const silkWalletAppOrigin2Staging = 'https://staging.waap.xyz'\nexport const authServerOrigin =\n silkNodeEnv === 'production'\n ? 'https://auth.waap.xyz'\n : silkNodeEnv === 'staging'\n ? 'https://staging.human-wallet.com'\n : 'https://localhost:8000'\n\n// WebSocket relay origin for auth completion notifications\nexport const wsRelayOrigin =\n silkNodeEnv === 'production'\n ? process.env.NEXT_PUBLIC_WS_RELAY_ORIGIN ||\n 'https://waap-ws-relay-ams.fly.dev'\n : silkNodeEnv === 'staging'\n ? process.env.NEXT_PUBLIC_WS_RELAY_ORIGIN ||\n 'https://staging-waap-ws-relay.fly.dev'\n : process.env.NEXT_PUBLIC_WS_RELAY_ORIGIN || 'ws://127.0.0.1:8081'\n// export const silkWalletAppOrigin2Prod = 'https://humansignon.com'\nexport const silkWalletAppOrigin2Prod = 'https://waap.xyz'\nexport const silkWalletAppOrigin2 =\n silkNodeEnv === 'production'\n ? silkWalletAppOrigin2Prod\n : silkNodeEnv === 'staging'\n ? silkWalletAppOrigin2Staging\n : 'http://127.0.0.1:3000'\nexport const silkAdminAppOrigin =\n silkNodeEnv === 'production'\n ? 'https://dashboard.silk.sc'\n : 'http://127.0.0.1:3002'\nexport const silkDemoAppOrigin =\n silkNodeEnv === 'production'\n ? 'https://silk-demo-app.vercel.app'\n : 'http://127.0.0.1:3001'\nexport const silkDevPortalOrigin =\n silkNodeEnv === 'development' || !silkNodeEnv\n ? 'http://localhost:3001'\n : 'https://silk-dev-portal-vercel-holonymid-holonym.vercel.app/'\nexport const silkMfaServerOrigin =\n silkNodeEnv === 'production'\n ? 'https://server.silkwallet.net'\n : 'http://0.0.0.0:3003'\nexport const silkPolicyEngineOrigin =\n silkNodeEnv === 'production'\n ? 'https://silk-protector-microservice-pe.com'\n : silkNodeEnv === 'staging'\n ? 'https://policyengine.staging.silk-protector.com'\n : 'http://127.0.0.1:3003'\nexport const silkKeyshareManagerOrigin =\n silkNodeEnv === 'production'\n ? 'https://silk-protector-microservice-km.com'\n : silkNodeEnv === 'staging'\n ? 'https://keyshare-manager.staging.silk-protector.com'\n : 'http://127.0.0.1:3004'\nexport const silkProtectorMainOrigin =\n silkNodeEnv === 'production'\n ? 'https://main.silk-protector.com'\n : silkNodeEnv === 'staging'\n ? 'https://protector-main.staging.silk-protector.com'\n : 'http://127.0.0.1:3005'\nexport const recoveryEmailAddress = 'test@recovery.silk.sc'\n\nexport const fieldOrder =\n '0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141'\n\nexport const rpcMethodRequiresUI = (method: JSON_RPC_METHOD) =>\n rpcMethodRequiresUIMap[method]\nexport const rpcMethodRequiresUIMap = {\n // Requires user interaction\n [JSON_RPC_METHOD.eth_sendTransaction]: true,\n [JSON_RPC_METHOD.personal_sign]: true,\n [JSON_RPC_METHOD.eth_signTypedData_v4]: true,\n // Does not require user interaction\n [JSON_RPC_METHOD.eth_getBalance]: false,\n [JSON_RPC_METHOD.eth_requestAccounts]: false,\n [JSON_RPC_METHOD.eth_accounts]: false,\n [JSON_RPC_METHOD.eth_chainId]: false,\n [JSON_RPC_METHOD.net_version]: false,\n [JSON_RPC_METHOD.wallet_switchEthereumChain]: false,\n [JSON_RPC_METHOD.wallet_addEthereumChain]: false,\n [JSON_RPC_METHOD.eth_estimateGas]: false,\n [JSON_RPC_METHOD.eth_blockNumber]: false,\n [JSON_RPC_METHOD.eth_getCode]: false,\n [JSON_RPC_METHOD.eth_call]: false,\n [JSON_RPC_METHOD.eth_getTransactionReceipt]: false,\n [JSON_RPC_METHOD.eth_getTransactionByHash]: false\n}\n"],"names":["wsRelayOrigin","process","env","NEXT_PUBLIC_WS_RELAY_ORIGIN","silkWalletAppOrigin2Prod","silkWalletAppOrigin2","rpcMethodRequiresUIMap","_rpcMethodRequiresUIM","JSON_RPC_METHOD","eth_sendTransaction","personal_sign","eth_signTypedData_v4","eth_getBalance","eth_requestAccounts","eth_accounts","eth_chainId","net_version","wallet_switchEthereumChain","wallet_addEthereumChain","eth_estimateGas","eth_blockNumber","eth_getCode","eth_call","eth_getTransactionReceipt","eth_getTransactionByHash","method","silkNodeEnv"],"mappings":"kVAqBaA,EAEPC,QAAQC,IAAIC,6BACZ,oCAMOC,EAA2B,mBAC3BC,EAEPD,EA6COE,IAAsBC,EAAAA,CAAAA,GAEhCC,kBAAgBC,sBAAsB,EAAIF,EAC1CC,EAAeA,gBAACE,gBAAgB,EAAIH,EACpCC,EAAeA,gBAACG,uBAAuB,EAAIJ,EAE3CC,EAAeA,gBAACI,iBAAiB,EAAKL,EACtCC,EAAeA,gBAACK,sBAAsB,EAAKN,EAC3CC,EAAeA,gBAACM,eAAe,EAAKP,EACpCC,EAAAA,gBAAgBO,cAAc,EAAKR,EACnCC,EAAAA,gBAAgBQ,cAAc,EAAKT,EACnCC,EAAAA,gBAAgBS,6BAA6B,EAAKV,EAClDC,EAAAA,gBAAgBU,0BAA0B,EAAKX,EAC/CC,EAAAA,gBAAgBW,kBAAkB,EAAKZ,EACvCC,kBAAgBY,kBAAkB,EAAKb,EACvCC,kBAAgBa,cAAc,EAAKd,EACnCC,kBAAgBc,WAAW,EAAKf,EAChCC,kBAAgBe,4BAA4B,EAAKhB,EACjDC,kBAAgBgB,2BAA2B,EAAKjB,sBAjF7C,qCA2DJ,4FAHkC,8CAKD,SAACkB,GAAuB,OACzDnB,EAAuBmB,EAAO,kDAtC1B,gDAIA,yDAGJC,2FAeI,mEAVA,yDAIA,uEAYA,wDAzDA,6GAEqC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@human.tech/waap-constants",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Constants for Silk",
|
|
5
|
+
"source": "src/index.ts",
|
|
6
|
+
"exports": {
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"require": "./dist/index.js",
|
|
9
|
+
"default": "./dist/index.modern.mjs"
|
|
10
|
+
},
|
|
11
|
+
"main": "./dist/index.js",
|
|
12
|
+
"module": "./dist/index.module.js",
|
|
13
|
+
"unpkg": "./dist/index.umd.js",
|
|
14
|
+
"author": "",
|
|
15
|
+
"license": "",
|
|
16
|
+
"private": false,
|
|
17
|
+
"files": [
|
|
18
|
+
"/dist"
|
|
19
|
+
],
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": ">=18.0.0"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@types/node": "^20.2.1",
|
|
25
|
+
"eslint": "8.38.0",
|
|
26
|
+
"eslint-plugin-jest": "^27.2.3",
|
|
27
|
+
"microbundle": "^0.15.1",
|
|
28
|
+
"typescript": "^5.0.4",
|
|
29
|
+
"eslint-config-custom": "0.0.0"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@silk-wallet/silk-interface-core": "0.4.4"
|
|
33
|
+
},
|
|
34
|
+
"scripts": {
|
|
35
|
+
"build": "microbundle",
|
|
36
|
+
"build-to-publish": "microbundle --define process.env.SILK_NODE_ENV=production",
|
|
37
|
+
"build-for-extension": "microbundle --define process.env.SILK_NODE_ENV=staging",
|
|
38
|
+
"dev": "microbundle watch",
|
|
39
|
+
"lint-check": "(bash ../../scripts/list-src-changes.sh) | xargs eslint --ext .ts,.tsx",
|
|
40
|
+
"lint-fix": "(bash ../../scripts/list-src-changes.sh) | xargs eslint --fix --ext .ts,.tsx",
|
|
41
|
+
"format": "prettier --write \"**/*.{ts,tsx,md}\""
|
|
42
|
+
}
|
|
43
|
+
}
|