@rango-dev/provider-rabby 0.3.0 → 0.3.1-next.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/CHANGELOG.md +4 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/provider-rabby.build.json +1 -1
- package/package.json +3 -3
- package/src/index.ts +2 -2
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { CanEagerConnect, CanSwitchNetwork, Connect, Subscribe, SwitchNetwork, WalletInfo } from '@rango-dev/wallets-shared';
|
|
2
2
|
import type { BlockchainMeta, SignerFactory } from 'rango-types';
|
|
3
3
|
import { WalletTypes } from '@rango-dev/wallets-shared';
|
|
4
|
-
import { rabby as rabby_instance } from './helpers';
|
|
4
|
+
import { rabby as rabby_instance } from './helpers.js';
|
|
5
5
|
export declare const config: {
|
|
6
6
|
type: WalletTypes;
|
|
7
7
|
};
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAChB,OAAO,EACP,SAAS,EACT,aAAa,EACb,UAAU,EACX,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjE,OAAO,EAML,WAAW,EACZ,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAChB,OAAO,EACP,SAAS,EACT,aAAa,EACb,UAAU,EACX,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjE,OAAO,EAML,WAAW,EACZ,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,cAAc,CAAC;AAGvD,eAAO,MAAM,MAAM;;CAElB,CAAC;AAEF,eAAO,MAAM,WAAW,uBAAiB,CAAC;AAC1C,eAAO,MAAM,OAAO,EAAE,OAarB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,SAA0B,CAAC;AAEnD,eAAO,MAAM,aAAa,EAAE,aAAmC,CAAC;AAEhE,eAAO,MAAM,kBAAkB,EAAE,gBAAwC,CAAC;AAE1E,eAAO,MAAM,UAAU,EAAE,CAAC,QAAQ,EAAE,GAAG,KAAK,aAAsB,CAAC;AAEnE,eAAO,MAAM,eAAe,EAAE,eAAwC,CAAC;AAEvE,eAAO,MAAM,aAAa,EAAE,CAAC,cAAc,EAAE,cAAc,EAAE,KAAK,UAejE,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.ts", "../src/helpers.ts", "../src/signer.ts"],
|
|
4
|
-
"sourcesContent": ["import type {\n CanEagerConnect,\n CanSwitchNetwork,\n Connect,\n Subscribe,\n SwitchNetwork,\n WalletInfo,\n} from '@rango-dev/wallets-shared';\nimport type { BlockchainMeta, SignerFactory } from 'rango-types';\n\nimport {\n canEagerlyConnectToEvm,\n canSwitchNetworkToEvm,\n getEvmAccounts,\n subscribeToEvm,\n switchNetworkForEvm,\n WalletTypes,\n} from '@rango-dev/wallets-shared';\nimport { evmBlockchains } from 'rango-types';\n\nimport { rabby as rabby_instance } from './helpers';\nimport signer from './signer';\n\nexport const config = {\n type: WalletTypes.Rabby,\n};\n\nexport const getInstance = rabby_instance;\nexport const connect: Connect = async ({ instance }) => {\n /*\n * Note: We need to get `chainId` here, because for the first time\n * after opening the browser, wallet is locked, and don't give us accounts and chainId\n * on `check` phase, so `network` will be null. For this case we need to get chainId\n * whenever we are requesting accounts.\n */\n const { accounts, chainId } = await getEvmAccounts(instance);\n\n return {\n accounts,\n chainId,\n };\n};\n\nexport const subscribe: Subscribe = subscribeToEvm;\n\nexport const switchNetwork: SwitchNetwork = switchNetworkForEvm;\n\nexport const canSwitchNetworkTo: CanSwitchNetwork = canSwitchNetworkToEvm;\n\nexport const getSigners: (provider: any) => SignerFactory = signer;\n\nexport const canEagerConnect: CanEagerConnect = canEagerlyConnectToEvm;\n\nexport const getWalletInfo: (allBlockChains: BlockchainMeta[]) => WalletInfo = (\n allBlockChains\n) => {\n const evms = evmBlockchains(allBlockChains);\n return {\n name: 'Rabby',\n img: 'https://raw.githubusercontent.com/rango-exchange/assets/main/wallets/rabby/icon.svg',\n installLink: {\n CHROME:\n 'https://chromewebstore.google.com/detail/rabby-wallet/acmacodkjbdgmoleebolmdjonilkdbch',\n DEFAULT: 'https://rabby.io/',\n },\n color: '#fff',\n supportedChains: evms,\n };\n};\n", "export function rabby() {\n const { ethereum } = window;\n\n return ethereum?.isRabby ? ethereum : null;\n}\n", "import type { SignerFactory } from 'rango-types';\n\nimport { DefaultEvmSigner } from '@rango-dev/signer-evm';\nimport { DefaultSignerFactory, TransactionType as TxType } from 'rango-types';\n\nexport default function getSigners(provider: any): SignerFactory {\n const signers = new DefaultSignerFactory();\n signers.registerSigner(TxType.EVM, new DefaultEvmSigner(provider));\n return signers;\n}\n"],
|
|
4
|
+
"sourcesContent": ["import type {\n CanEagerConnect,\n CanSwitchNetwork,\n Connect,\n Subscribe,\n SwitchNetwork,\n WalletInfo,\n} from '@rango-dev/wallets-shared';\nimport type { BlockchainMeta, SignerFactory } from 'rango-types';\n\nimport {\n canEagerlyConnectToEvm,\n canSwitchNetworkToEvm,\n getEvmAccounts,\n subscribeToEvm,\n switchNetworkForEvm,\n WalletTypes,\n} from '@rango-dev/wallets-shared';\nimport { evmBlockchains } from 'rango-types';\n\nimport { rabby as rabby_instance } from './helpers.js';\nimport signer from './signer.js';\n\nexport const config = {\n type: WalletTypes.Rabby,\n};\n\nexport const getInstance = rabby_instance;\nexport const connect: Connect = async ({ instance }) => {\n /*\n * Note: We need to get `chainId` here, because for the first time\n * after opening the browser, wallet is locked, and don't give us accounts and chainId\n * on `check` phase, so `network` will be null. For this case we need to get chainId\n * whenever we are requesting accounts.\n */\n const { accounts, chainId } = await getEvmAccounts(instance);\n\n return {\n accounts,\n chainId,\n };\n};\n\nexport const subscribe: Subscribe = subscribeToEvm;\n\nexport const switchNetwork: SwitchNetwork = switchNetworkForEvm;\n\nexport const canSwitchNetworkTo: CanSwitchNetwork = canSwitchNetworkToEvm;\n\nexport const getSigners: (provider: any) => SignerFactory = signer;\n\nexport const canEagerConnect: CanEagerConnect = canEagerlyConnectToEvm;\n\nexport const getWalletInfo: (allBlockChains: BlockchainMeta[]) => WalletInfo = (\n allBlockChains\n) => {\n const evms = evmBlockchains(allBlockChains);\n return {\n name: 'Rabby',\n img: 'https://raw.githubusercontent.com/rango-exchange/assets/main/wallets/rabby/icon.svg',\n installLink: {\n CHROME:\n 'https://chromewebstore.google.com/detail/rabby-wallet/acmacodkjbdgmoleebolmdjonilkdbch',\n DEFAULT: 'https://rabby.io/',\n },\n color: '#fff',\n supportedChains: evms,\n };\n};\n", "export function rabby() {\n const { ethereum } = window;\n\n return ethereum?.isRabby ? ethereum : null;\n}\n", "import type { SignerFactory } from 'rango-types';\n\nimport { DefaultEvmSigner } from '@rango-dev/signer-evm';\nimport { DefaultSignerFactory, TransactionType as TxType } from 'rango-types';\n\nexport default function getSigners(provider: any): SignerFactory {\n const signers = new DefaultSignerFactory();\n signers.registerSigner(TxType.EVM, new DefaultEvmSigner(provider));\n return signers;\n}\n"],
|
|
5
5
|
"mappings": "+EAUA,OACE,0BAAAA,EACA,yBAAAC,EACA,kBAAAC,EACA,kBAAAC,EACA,uBAAAC,EACA,eAAAC,MACK,4BACP,OAAS,kBAAAC,MAAsB,cClBxB,SAASC,GAAQ,CACtB,GAAM,CAAE,SAAAC,CAAS,EAAI,OAErB,OAAOA,GAAU,QAAUA,EAAW,IACxC,CAJgBC,EAAAF,EAAA,SCEhB,OAAS,oBAAAG,MAAwB,wBACjC,OAAS,wBAAAC,EAAsB,mBAAmBC,MAAc,cAEjD,SAARC,EAA4BC,EAA8B,CAC/D,IAAMC,EAAU,IAAIC,EACpB,OAAAD,EAAQ,eAAeE,EAAO,IAAK,IAAIC,EAAiBJ,CAAQ,CAAC,EAC1DC,CACT,CAJwBI,EAAAN,EAAA,cFkBjB,IAAMO,EAAS,CACpB,KAAMC,EAAY,KACpB,EAEaC,EAAcC,EACdC,EAAmBC,EAAA,MAAO,CAAE,SAAAC,CAAS,IAAM,CAOtD,GAAM,CAAE,SAAAC,EAAU,QAAAC,CAAQ,EAAI,MAAMC,EAAeH,CAAQ,EAE3D,MAAO,CACL,SAAAC,EACA,QAAAC,CACF,CACF,EAbgC,WAenBE,EAAuBC,EAEvBC,EAA+BC,EAE/BC,EAAuCC,EAEvCC,EAA+CA,EAE/CC,EAAmCC,EAEnCC,EAAkEd,EAC7Ee,GACG,CACH,IAAMC,EAAOC,EAAeF,CAAc,EAC1C,MAAO,CACL,KAAM,QACN,IAAK,sFACL,YAAa,CACX,OACE,yFACF,QAAS,mBACX,EACA,MAAO,OACP,gBAAiBC,CACnB,CACF,EAf+E",
|
|
6
6
|
"names": ["canEagerlyConnectToEvm", "canSwitchNetworkToEvm", "getEvmAccounts", "subscribeToEvm", "switchNetworkForEvm", "WalletTypes", "evmBlockchains", "rabby", "ethereum", "__name", "DefaultEvmSigner", "DefaultSignerFactory", "TxType", "getSigners", "provider", "signers", "DefaultSignerFactory", "TxType", "DefaultEvmSigner", "__name", "config", "WalletTypes", "getInstance", "rabby", "connect", "__name", "instance", "accounts", "chainId", "getEvmAccounts", "subscribe", "subscribeToEvm", "switchNetwork", "switchNetworkForEvm", "canSwitchNetworkTo", "canSwitchNetworkToEvm", "getSigners", "canEagerConnect", "canEagerlyConnectToEvm", "getWalletInfo", "allBlockChains", "evms", "evmBlockchains"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/helpers.ts":{"bytes":106,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/signer.ts":{"bytes":392,"imports":[{"path":"@rango-dev/signer-evm","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":
|
|
1
|
+
{"inputs":{"src/helpers.ts":{"bytes":106,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/signer.ts":{"bytes":392,"imports":[{"path":"@rango-dev/signer-evm","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":1928,"imports":[{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"src/helpers.ts","kind":"import-statement","original":"./helpers.js"},{"path":"src/signer.ts","kind":"import-statement","original":"./signer.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":4201},"dist/index.js":{"imports":[{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"@rango-dev/signer-evm","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true}],"exports":["canEagerConnect","canSwitchNetworkTo","config","connect","getInstance","getSigners","getWalletInfo","subscribe","switchNetwork"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":687},"src/helpers.ts":{"bytesInOutput":74},"src/signer.ts":{"bytesInOutput":215}},"bytes":1254}}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rango-dev/provider-rabby",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1-next.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"lint": "eslint \"**/*.{ts,tsx}\" --ignore-path ../../.eslintignore"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@rango-dev/signer-evm": "^0.29.0",
|
|
25
|
-
"@rango-dev/wallets-shared": "^0.36.0",
|
|
24
|
+
"@rango-dev/signer-evm": "^0.29.1-next.0",
|
|
25
|
+
"@rango-dev/wallets-shared": "^0.36.1-next.0",
|
|
26
26
|
"rango-types": "^0.1.59"
|
|
27
27
|
},
|
|
28
28
|
"publishConfig": {
|
package/src/index.ts
CHANGED
|
@@ -18,8 +18,8 @@ import {
|
|
|
18
18
|
} from '@rango-dev/wallets-shared';
|
|
19
19
|
import { evmBlockchains } from 'rango-types';
|
|
20
20
|
|
|
21
|
-
import { rabby as rabby_instance } from './helpers';
|
|
22
|
-
import signer from './signer';
|
|
21
|
+
import { rabby as rabby_instance } from './helpers.js';
|
|
22
|
+
import signer from './signer.js';
|
|
23
23
|
|
|
24
24
|
export const config = {
|
|
25
25
|
type: WalletTypes.Rabby,
|