@rango-dev/provider-slush 0.0.0-experimental-936229e8-20251208

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 ADDED
@@ -0,0 +1,72 @@
1
+ # [0.11.0](https://github.com/rango-exchange/rango-client/compare/provider-slush@0.10.1...provider-slush@0.11.0) (2025-12-02)
2
+
3
+
4
+
5
+ ## [0.10.1](https://github.com/rango-exchange/rango-client/compare/provider-slush@0.10.0...provider-slush@0.10.1) (2025-11-22)
6
+
7
+
8
+
9
+ # [0.8.0](https://github.com/rango-exchange/rango-client/compare/provider-slush@0.7.0...provider-slush@0.8.0) (2025-10-29)
10
+
11
+
12
+ ### Reverts
13
+
14
+ * Revert "feat: implement deep linking" ([a0b0edc](https://github.com/rango-exchange/rango-client/commit/a0b0edcc052bfea69af2037b73c0bb6a9b38c2a9))
15
+
16
+
17
+
18
+ # [0.7.0](https://github.com/rango-exchange/rango-client/compare/provider-slush@0.6.0...provider-slush@0.7.0) (2025-09-29)
19
+
20
+
21
+
22
+ # [0.6.0](https://github.com/rango-exchange/rango-client/compare/provider-slush@0.5.0...provider-slush@0.6.0) (2025-09-06)
23
+
24
+
25
+ ### Features
26
+
27
+ * implement deep linking ([1dec48e](https://github.com/rango-exchange/rango-client/commit/1dec48e4db944977fb6d3797d7aa49527940fab6))
28
+
29
+
30
+
31
+ # [0.5.0](https://github.com/rango-exchange/rango-client/compare/provider-slush@0.4.0...provider-slush@0.5.0) (2025-08-19)
32
+
33
+
34
+ ### Bug Fixes
35
+
36
+ * add rango-dev/wallets-core to dependencies of providers ([84b4b2b](https://github.com/rango-exchange/rango-client/commit/84b4b2b7c3a7f5631228fb6ebf04617c3c4428e9))
37
+ * remove retry dynamic import and throw refined error on dynamic import failure ([a2944ac](https://github.com/rango-exchange/rango-client/commit/a2944ac3c05a0e945f6e5621fa5693ab89625485))
38
+
39
+
40
+ ### Features
41
+
42
+ * implement retry mechanism for lazy imports ([9a8e191](https://github.com/rango-exchange/rango-client/commit/9a8e191711d2319990ca4d0613e8188a5f86842f))
43
+
44
+
45
+
46
+ # [0.4.0](https://github.com/rango-exchange/rango-client/compare/provider-slush@0.3.0...provider-slush@0.4.0) (2025-08-05)
47
+
48
+
49
+
50
+ # [0.3.0](https://github.com/rango-exchange/rango-client/compare/provider-slush@0.2.0...provider-slush@0.3.0) (2025-07-22)
51
+
52
+
53
+ ### Reverts
54
+
55
+ * Revert "chore(release): publish" ([064ce15](https://github.com/rango-exchange/rango-client/commit/064ce157a2f819856f647f83aeb1c0410542e8d7))
56
+
57
+
58
+
59
+ # 0.1.0 (2025-06-09)
60
+
61
+
62
+ ### Bug Fixes
63
+
64
+ * playground crash on filter wallets ([f0e98ce](https://github.com/rango-exchange/rango-client/commit/f0e98cec6377324385e429df1b6f739770eff089))
65
+
66
+
67
+ ### Features
68
+
69
+ * integrate slush wallet ([9e9a5cc](https://github.com/rango-exchange/rango-client/commit/9e9a5ccb802fbd1f9a50322a89f65b557f152c6a))
70
+
71
+
72
+
@@ -0,0 +1,5 @@
1
+ import { type ProviderMetadata } from '@rango-dev/wallets-core';
2
+ export declare const WALLET_ID = "slush";
3
+ export declare const WALLET_NAME_IN_WALLET_STANDARD = "Slush";
4
+ export declare const metadata: ProviderMetadata;
5
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAShE,eAAO,MAAM,SAAS,UAAU,CAAC;AACjC,eAAO,MAAM,8BAA8B,UAAU,CAAC;AAEtD,eAAO,MAAM,QAAQ,EAAE,gBAmCtB,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { LegacyProviderInterface } from '@rango-dev/wallets-core/legacy';
2
+ import type { WalletInfo } from '@rango-dev/wallets-shared';
3
+ import { WalletTypes } from '@rango-dev/wallets-shared';
4
+ import { type BlockchainMeta, type SignerFactory } from 'rango-types';
5
+ import { suiWalletInstance } from '../utils.js';
6
+ type Provider = any;
7
+ export declare const config: {
8
+ type: WalletTypes;
9
+ };
10
+ export declare const getInstance: typeof suiWalletInstance;
11
+ export declare const getSigners: (provider: Provider) => Promise<SignerFactory>;
12
+ export declare const getWalletInfo: (allBlockChains: BlockchainMeta[]) => WalletInfo;
13
+ declare const buildLegacyProvider: () => LegacyProviderInterface;
14
+ export { buildLegacyProvider };
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/legacy/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,KAAK,EAAW,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAGtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAKhD,KAAK,QAAQ,GAAG,GAAG,CAAC;AAEpB,eAAO,MAAM,MAAM;;CAElB,CAAC;AAEF,eAAO,MAAM,WAAW,0BAAoB,CAAC;AAM7C,eAAO,MAAM,UAAU,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,OAAO,CAAC,aAAa,CAC9D,CAAC;AAET,eAAO,MAAM,aAAa,EAAE,CAC1B,cAAc,EAAE,cAAc,EAAE,KAC7B,UAEJ,CAAC;AAEF,QAAA,MAAM,mBAAmB,EAAE,MAAM,uBAM/B,CAAC;AAEH,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
package/dist/mod.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ declare const versions: () => import("@rango-dev/wallets-core/utils").VersionedProviders;
2
+ export { versions };
3
+ //# sourceMappingURL=mod.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAKA,QAAA,MAAM,QAAQ,kEAIF,CAAC;AAEb,OAAO,EAAE,QAAQ,EAAE,CAAC"}
package/dist/mod.js ADDED
@@ -0,0 +1,2 @@
1
+ var u=Object.defineProperty;var e=(t,o)=>u(t,"name",{value:o,configurable:!0});import{defineVersions as M}from"@rango-dev/wallets-core/utils";import{WalletTypes as L}from"@rango-dev/wallets-shared";import"rango-types";import{getInstanceOrThrow as f}from"@rango-dev/wallets-core/namespaces/sui";import{dynamicImportWithRefinedError as S}from"@rango-dev/wallets-shared";import{DefaultSignerFactory as h,TransactionType as y}from"rango-types";import"@rango-dev/wallets-core";import{TransactionType as g}from"rango-types";var i="slush",r="Slush",c={name:"Slush",icon:"https://raw.githubusercontent.com/rango-exchange/assets/main/wallets/slush/icon.svg",extensions:{chrome:"https://chromewebstore.google.com/detail/slush-%E2%80%94-a-sui-wallet/opcgpfmipidbgpenhmajoajpbobppdil",edge:"https://chromewebstore.google.com/detail/slush-%E2%80%94-a-sui-wallet/opcgpfmipidbgpenhmajoajpbobppdil",brave:"https://chromewebstore.google.com/detail/slush-%E2%80%94-a-sui-wallet/opcgpfmipidbgpenhmajoajpbobppdil",homepage:"https://slush.app/download"},properties:[{name:"namespaces",value:{data:[{label:"Sui",value:"Sui",id:"SUI",getSupportedChains:t=>t.filter(o=>o.type===g.SUI)}],selection:"multiple"}},{name:"signers",value:{getSigners:async()=>a()}}]};async function a(){let t=f(r),{DefaultSuiSigner:o}=await S(async()=>await import("@rango-dev/signer-sui")),s=new h;return s.registerSigner(y.SUI,new o(t)),s}e(a,"getSigners");import"@mysten/wallet-standard";import{getInstanceOrThrow as b}from"@rango-dev/wallets-core/namespaces/sui";function n(){try{return b(r)}catch{return null}}e(n,"suiWalletInstance");var W=L.SLUSH,A={type:W},E=n,v=e(async()=>{throw new Error("not implemented")},"connect"),w=a,T=e(()=>{throw new Error("not implemented")},"getWalletInfo"),p=e(()=>({config:A,getInstance:E,connect:v,getSigners:w,getWalletInfo:T}),"buildLegacyProvider");import{ProviderBuilder as N}from"@rango-dev/wallets-core";import{NamespaceBuilder as I}from"@rango-dev/wallets-core";import{builders as _}from"@rango-dev/wallets-core/namespaces/common";import{actions as x,builders as l}from"@rango-dev/wallets-core/namespaces/sui";var D=l.canEagerConnect().action(x.canEagerConnect({name:r})).build(),F=l.connect({name:r}).build(),P=_.disconnect().before(async()=>{await n()?.features["standard:disconnect"].disconnect()}).build(),m=new I("Sui",i).action(F).action(P).action(D).build();var d=e(()=>new N(i).init(function(t){let[,o]=t.state();n()&&(o("installed",!0),console.debug("[slush] instance detected.",t))}).config("metadata",c).add("sui",m).build(),"buildProvider");var ye=e(()=>M().version("0.0.0",p()).version("1.0.0",d()).build(),"versions");export{ye as versions};
2
+ //# sourceMappingURL=mod.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/mod.ts", "../src/legacy/index.ts", "../src/signer.ts", "../src/constants.ts", "../src/utils.ts", "../src/provider.ts", "../src/namespaces/sui.ts"],
4
+ "sourcesContent": ["import { defineVersions } from '@rango-dev/wallets-core/utils';\n\nimport { buildLegacyProvider } from './legacy/index.js';\nimport { buildProvider } from './provider.js';\n\nconst versions = () =>\n defineVersions()\n .version('0.0.0', buildLegacyProvider())\n .version('1.0.0', buildProvider())\n .build();\n\nexport { versions };\n", "import type { LegacyProviderInterface } from '@rango-dev/wallets-core/legacy';\nimport type { Connect, WalletInfo } from '@rango-dev/wallets-shared';\n\nimport { WalletTypes } from '@rango-dev/wallets-shared';\nimport { type BlockchainMeta, type SignerFactory } from 'rango-types';\n\nimport signer from '../signer.js';\nimport { suiWalletInstance } from '../utils.js';\n\nconst WALLET = WalletTypes.SLUSH;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype Provider = any;\n\nexport const config = {\n type: WALLET,\n};\n\nexport const getInstance = suiWalletInstance;\n\nconst connect: Connect = async () => {\n throw new Error('not implemented');\n};\n\nexport const getSigners: (provider: Provider) => Promise<SignerFactory> =\n signer;\n\nexport const getWalletInfo: (\n allBlockChains: BlockchainMeta[]\n) => WalletInfo = () => {\n throw new Error('not implemented');\n};\n\nconst buildLegacyProvider: () => LegacyProviderInterface = () => ({\n config,\n getInstance,\n connect,\n getSigners,\n getWalletInfo,\n});\n\nexport { buildLegacyProvider };\n", "import type { SignerFactory } from 'rango-types';\n\nimport { getInstanceOrThrow } from '@rango-dev/wallets-core/namespaces/sui';\nimport { dynamicImportWithRefinedError } from '@rango-dev/wallets-shared';\nimport { DefaultSignerFactory, TransactionType as TxType } from 'rango-types';\n\nimport { WALLET_NAME_IN_WALLET_STANDARD } from './constants.js';\n\nexport default async function getSigners(): Promise<SignerFactory> {\n const suiWalletProvider = getInstanceOrThrow(WALLET_NAME_IN_WALLET_STANDARD);\n\n const { DefaultSuiSigner } = await dynamicImportWithRefinedError(\n async () => await import('@rango-dev/signer-sui')\n );\n const signers = new DefaultSignerFactory();\n signers.registerSigner(TxType.SUI, new DefaultSuiSigner(suiWalletProvider));\n return signers;\n}\n", "import { type ProviderMetadata } from '@rango-dev/wallets-core';\nimport {\n type BlockchainMeta,\n type SuiBlockchainMeta,\n TransactionType,\n} from 'rango-types';\n\nimport getSigners from './signer.js';\n\nexport const WALLET_ID = 'slush';\nexport const WALLET_NAME_IN_WALLET_STANDARD = 'Slush';\n\nexport const metadata: ProviderMetadata = {\n name: 'Slush',\n icon: 'https://raw.githubusercontent.com/rango-exchange/assets/main/wallets/slush/icon.svg',\n extensions: {\n chrome:\n 'https://chromewebstore.google.com/detail/slush-%E2%80%94-a-sui-wallet/opcgpfmipidbgpenhmajoajpbobppdil',\n edge: 'https://chromewebstore.google.com/detail/slush-%E2%80%94-a-sui-wallet/opcgpfmipidbgpenhmajoajpbobppdil',\n brave:\n 'https://chromewebstore.google.com/detail/slush-%E2%80%94-a-sui-wallet/opcgpfmipidbgpenhmajoajpbobppdil',\n homepage: 'https://slush.app/download',\n },\n properties: [\n {\n name: 'namespaces',\n value: {\n data: [\n {\n label: 'Sui',\n value: 'Sui',\n id: 'SUI',\n getSupportedChains: (allBlockchains: BlockchainMeta[]) =>\n allBlockchains.filter(\n (chain): chain is SuiBlockchainMeta =>\n chain.type === TransactionType.SUI\n ),\n },\n ],\n selection: 'multiple',\n },\n },\n {\n name: 'signers',\n value: { getSigners: async () => getSigners() },\n },\n ],\n};\n", "import {\n type StandardConnectFeature,\n type StandardDisconnectFeature,\n type StandardEventsFeature,\n type SuiFeatures,\n type WalletWithFeatures,\n} from '@mysten/wallet-standard';\nimport { getInstanceOrThrow } from '@rango-dev/wallets-core/namespaces/sui';\n\nimport { WALLET_NAME_IN_WALLET_STANDARD } from './constants.js';\n\ntype SuiWalletStandard = WalletWithFeatures<\n StandardConnectFeature &\n StandardEventsFeature &\n SuiFeatures &\n StandardDisconnectFeature\n>;\n\nexport function suiWalletInstance(): SuiWalletStandard | null {\n try {\n return getInstanceOrThrow(\n WALLET_NAME_IN_WALLET_STANDARD\n ) as SuiWalletStandard;\n } catch {\n return null;\n }\n}\n", "import { ProviderBuilder } from '@rango-dev/wallets-core';\n\nimport { metadata, WALLET_ID } from './constants.js';\nimport { sui } from './namespaces/sui.js';\nimport { suiWalletInstance } from './utils.js';\n\nconst buildProvider = () =>\n new ProviderBuilder(WALLET_ID)\n .init(function (context) {\n const [, setState] = context.state();\n if (suiWalletInstance()) {\n setState('installed', true);\n console.debug('[slush] instance detected.', context);\n }\n })\n .config('metadata', metadata)\n .add('sui', sui)\n .build();\n\nexport { buildProvider };\n", "import type { SuiActions } from '@rango-dev/wallets-core/namespaces/sui';\n\nimport { NamespaceBuilder } from '@rango-dev/wallets-core';\nimport { builders as commonBuilders } from '@rango-dev/wallets-core/namespaces/common';\nimport { actions, builders } from '@rango-dev/wallets-core/namespaces/sui';\n\nimport { WALLET_ID, WALLET_NAME_IN_WALLET_STANDARD } from '../constants.js';\nimport { suiWalletInstance } from '../utils.js';\n\nconst canEagerConnect = builders\n .canEagerConnect()\n .action(\n actions.canEagerConnect({\n name: WALLET_NAME_IN_WALLET_STANDARD,\n })\n )\n .build();\n\nconst connect = builders\n .connect({\n name: WALLET_NAME_IN_WALLET_STANDARD,\n })\n .build();\n\nconst disconnect = commonBuilders\n .disconnect<SuiActions>()\n /*\n * This addresses a wallet bug where changing accounts within the app\n * and then reconnecting results in a connection to the previously connected account.\n * Explicitly calling `disconnect()` on the wallet instance ensures the wallet\n * itself is disconnected, allowing for a proper connection to the intended account\n * upon subsequent reconnection.\n */\n .before(async () => {\n await suiWalletInstance()?.features['standard:disconnect'].disconnect();\n })\n .build();\n\nconst sui = new NamespaceBuilder<SuiActions>('Sui', WALLET_ID)\n .action(connect)\n .action(disconnect)\n .action(canEagerConnect)\n .build();\n\nexport { sui };\n"],
5
+ "mappings": "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",
6
+ "names": ["defineVersions", "WalletTypes", "getInstanceOrThrow", "dynamicImportWithRefinedError", "DefaultSignerFactory", "TxType", "TransactionType", "WALLET_ID", "WALLET_NAME_IN_WALLET_STANDARD", "metadata", "allBlockchains", "chain", "TransactionType", "getSigners", "getSigners", "suiWalletProvider", "getInstanceOrThrow", "WALLET_NAME_IN_WALLET_STANDARD", "DefaultSuiSigner", "dynamicImportWithRefinedError", "signers", "DefaultSignerFactory", "TxType", "__name", "getInstanceOrThrow", "suiWalletInstance", "getInstanceOrThrow", "WALLET_NAME_IN_WALLET_STANDARD", "__name", "WALLET", "WalletTypes", "config", "getInstance", "suiWalletInstance", "connect", "__name", "getSigners", "getWalletInfo", "buildLegacyProvider", "ProviderBuilder", "NamespaceBuilder", "commonBuilders", "actions", "builders", "canEagerConnect", "builders", "actions", "WALLET_NAME_IN_WALLET_STANDARD", "connect", "disconnect", "commonBuilders", "suiWalletInstance", "sui", "NamespaceBuilder", "WALLET_ID", "buildProvider", "__name", "ProviderBuilder", "WALLET_ID", "context", "setState", "suiWalletInstance", "metadata", "sui", "versions", "__name", "defineVersions", "buildLegacyProvider", "buildProvider"]
7
+ }
@@ -0,0 +1,4 @@
1
+ import type { SuiActions } from '@rango-dev/wallets-core/namespaces/sui';
2
+ declare const sui: import("@rango-dev/wallets-core").ProxiedNamespace<SuiActions>;
3
+ export { sui };
4
+ //# sourceMappingURL=sui.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sui.d.ts","sourceRoot":"","sources":["../../src/namespaces/sui.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAsCzE,QAAA,MAAM,GAAG,gEAIC,CAAC;AAEX,OAAO,EAAE,GAAG,EAAE,CAAC"}
@@ -0,0 +1 @@
1
+ {"inputs":{"src/constants.ts":{"bytes":1446,"imports":[{"path":"@rango-dev/wallets-core","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"src/signer.ts","kind":"import-statement","original":"./signer.js"}],"format":"esm"},"src/signer.ts":{"bytes":771,"imports":[{"path":"@rango-dev/wallets-core/namespaces/sui","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"src/constants.ts","kind":"import-statement","original":"./constants.js"},{"path":"@rango-dev/signer-sui","kind":"dynamic-import","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/utils.ts":{"bytes":684,"imports":[{"path":"@mysten/wallet-standard","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/sui","kind":"import-statement","external":true},{"path":"src/constants.ts","kind":"import-statement","original":"./constants.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/index.ts":{"bytes":1046,"imports":[{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"src/signer.ts","kind":"import-statement","original":"../signer.js"},{"path":"src/utils.ts","kind":"import-statement","original":"../utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/sui.ts":{"bytes":1406,"imports":[{"path":"@rango-dev/wallets-core","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/common","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/sui","kind":"import-statement","external":true},{"path":"src/constants.ts","kind":"import-statement","original":"../constants.js"},{"path":"src/utils.ts","kind":"import-statement","original":"../utils.js"}],"format":"esm"},"src/provider.ts":{"bytes":585,"imports":[{"path":"@rango-dev/wallets-core","kind":"import-statement","external":true},{"path":"src/constants.ts","kind":"import-statement","original":"./constants.js"},{"path":"src/namespaces/sui.ts","kind":"import-statement","original":"./namespaces/sui.js"},{"path":"src/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/mod.ts":{"bytes":332,"imports":[{"path":"@rango-dev/wallets-core/utils","kind":"import-statement","external":true},{"path":"src/legacy/index.ts","kind":"import-statement","original":"./legacy/index.js"},{"path":"src/provider.ts","kind":"import-statement","original":"./provider.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":9930},"dist/mod.js":{"imports":[{"path":"@rango-dev/wallets-core/utils","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/sui","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"@rango-dev/signer-sui","kind":"dynamic-import","external":true},{"path":"@mysten/wallet-standard","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/sui","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/common","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/sui","kind":"import-statement","external":true}],"exports":["versions"],"entryPoint":"src/mod.ts","inputs":{"src/mod.ts":{"bytesInOutput":142},"src/legacy/index.ts":{"bytesInOutput":329},"src/signer.ts":{"bytesInOutput":397},"src/constants.ts":{"bytesInOutput":797},"src/utils.ts":{"bytesInOutput":181},"src/provider.ts":{"bytesInOutput":246},"src/namespaces/sui.ts":{"bytesInOutput":462}},"bytes":2689}}}
@@ -0,0 +1,3 @@
1
+ declare const buildProvider: () => import("@rango-dev/wallets-core").Provider;
2
+ export { buildProvider };
3
+ //# sourceMappingURL=provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,aAAa,kDAWP,CAAC;AAEb,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { SignerFactory } from 'rango-types';
2
+ export default function getSigners(): Promise<SignerFactory>;
3
+ //# sourceMappingURL=signer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../src/signer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAQjD,wBAA8B,UAAU,IAAI,OAAO,CAAC,aAAa,CAAC,CASjE"}
@@ -0,0 +1,5 @@
1
+ import { type StandardConnectFeature, type StandardDisconnectFeature, type StandardEventsFeature, type SuiFeatures, type WalletWithFeatures } from '@mysten/wallet-standard';
2
+ type SuiWalletStandard = WalletWithFeatures<StandardConnectFeature & StandardEventsFeature & SuiFeatures & StandardDisconnectFeature>;
3
+ export declare function suiWalletInstance(): SuiWalletStandard | null;
4
+ export {};
5
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,EAC1B,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACxB,MAAM,yBAAyB,CAAC;AAKjC,KAAK,iBAAiB,GAAG,kBAAkB,CACzC,sBAAsB,GACpB,qBAAqB,GACrB,WAAW,GACX,yBAAyB,CAC5B,CAAC;AAEF,wBAAgB,iBAAiB,IAAI,iBAAiB,GAAG,IAAI,CAQ5D"}
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "@rango-dev/provider-slush",
3
+ "version": "0.0.0-experimental-936229e8-20251208",
4
+ "license": "MIT",
5
+ "type": "module",
6
+ "source": "./src/mod.ts",
7
+ "main": "./dist/mod.js",
8
+ "exports": {
9
+ ".": "./dist/mod.js"
10
+ },
11
+ "typings": "dist/mod.d.ts",
12
+ "files": [
13
+ "dist",
14
+ "src"
15
+ ],
16
+ "scripts": {
17
+ "build": "node ../../scripts/build/command.mjs --path wallets/provider-slush --inputs src/mod.ts",
18
+ "ts-check": "tsc --declaration --emitDeclarationOnly -p ./tsconfig.json",
19
+ "clean": "rimraf dist",
20
+ "format": "prettier --write '{.,src}/**/*.{ts,tsx}'",
21
+ "lint": "eslint \"**/*.{ts,tsx}\""
22
+ },
23
+ "dependencies": {
24
+ "@mysten/sui": "^1.21.2",
25
+ "@mysten/wallet-standard": "^0.13.26",
26
+ "@rango-dev/signer-sui": "^0.8.0",
27
+ "@rango-dev/wallets-core": "^0.0.0-experimental-936229e8-20251208",
28
+ "@rango-dev/wallets-shared": "^0.0.0-experimental-936229e8-20251208",
29
+ "rango-types": "^0.1.89"
30
+ },
31
+ "publishConfig": {
32
+ "access": "public"
33
+ }
34
+ }
package/readme.md ADDED
@@ -0,0 +1,26 @@
1
+ # Slush
2
+ Slush integration for hub.
3
+ [Homepage](https://slush.app/) | [Docs](https://docs.sui.io/standards/wallet-standard)
4
+
5
+ More about implementation status can be found [here](../readme.md).
6
+
7
+ ## Implementation notes/limitation
8
+
9
+ ### Group
10
+
11
+ #### ✅ Sui
12
+ Only supports the Sui blockchain.
13
+
14
+ ### Feature
15
+
16
+ #### ❌ Switch Account
17
+ The wallet does not emit an event when the active account changes, making it difficult to detect account switches programmatically.
18
+
19
+ Regardless of the selected account in the wallet UI, Slush always connects to the first account.
20
+
21
+ #### ❌ Cross Browser
22
+ The wallet is only available on Chrome.
23
+
24
+ ---
25
+
26
+ More wallet information can be found in [wallets readme](../readme.md).
@@ -0,0 +1,48 @@
1
+ import { type ProviderMetadata } from '@rango-dev/wallets-core';
2
+ import {
3
+ type BlockchainMeta,
4
+ type SuiBlockchainMeta,
5
+ TransactionType,
6
+ } from 'rango-types';
7
+
8
+ import getSigners from './signer.js';
9
+
10
+ export const WALLET_ID = 'slush';
11
+ export const WALLET_NAME_IN_WALLET_STANDARD = 'Slush';
12
+
13
+ export const metadata: ProviderMetadata = {
14
+ name: 'Slush',
15
+ icon: 'https://raw.githubusercontent.com/rango-exchange/assets/main/wallets/slush/icon.svg',
16
+ extensions: {
17
+ chrome:
18
+ 'https://chromewebstore.google.com/detail/slush-%E2%80%94-a-sui-wallet/opcgpfmipidbgpenhmajoajpbobppdil',
19
+ edge: 'https://chromewebstore.google.com/detail/slush-%E2%80%94-a-sui-wallet/opcgpfmipidbgpenhmajoajpbobppdil',
20
+ brave:
21
+ 'https://chromewebstore.google.com/detail/slush-%E2%80%94-a-sui-wallet/opcgpfmipidbgpenhmajoajpbobppdil',
22
+ homepage: 'https://slush.app/download',
23
+ },
24
+ properties: [
25
+ {
26
+ name: 'namespaces',
27
+ value: {
28
+ data: [
29
+ {
30
+ label: 'Sui',
31
+ value: 'Sui',
32
+ id: 'SUI',
33
+ getSupportedChains: (allBlockchains: BlockchainMeta[]) =>
34
+ allBlockchains.filter(
35
+ (chain): chain is SuiBlockchainMeta =>
36
+ chain.type === TransactionType.SUI
37
+ ),
38
+ },
39
+ ],
40
+ selection: 'multiple',
41
+ },
42
+ },
43
+ {
44
+ name: 'signers',
45
+ value: { getSigners: async () => getSigners() },
46
+ },
47
+ ],
48
+ };
@@ -0,0 +1,42 @@
1
+ import type { LegacyProviderInterface } from '@rango-dev/wallets-core/legacy';
2
+ import type { Connect, WalletInfo } from '@rango-dev/wallets-shared';
3
+
4
+ import { WalletTypes } from '@rango-dev/wallets-shared';
5
+ import { type BlockchainMeta, type SignerFactory } from 'rango-types';
6
+
7
+ import signer from '../signer.js';
8
+ import { suiWalletInstance } from '../utils.js';
9
+
10
+ const WALLET = WalletTypes.SLUSH;
11
+
12
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
13
+ type Provider = any;
14
+
15
+ export const config = {
16
+ type: WALLET,
17
+ };
18
+
19
+ export const getInstance = suiWalletInstance;
20
+
21
+ const connect: Connect = async () => {
22
+ throw new Error('not implemented');
23
+ };
24
+
25
+ export const getSigners: (provider: Provider) => Promise<SignerFactory> =
26
+ signer;
27
+
28
+ export const getWalletInfo: (
29
+ allBlockChains: BlockchainMeta[]
30
+ ) => WalletInfo = () => {
31
+ throw new Error('not implemented');
32
+ };
33
+
34
+ const buildLegacyProvider: () => LegacyProviderInterface = () => ({
35
+ config,
36
+ getInstance,
37
+ connect,
38
+ getSigners,
39
+ getWalletInfo,
40
+ });
41
+
42
+ export { buildLegacyProvider };
package/src/mod.ts ADDED
@@ -0,0 +1,12 @@
1
+ import { defineVersions } from '@rango-dev/wallets-core/utils';
2
+
3
+ import { buildLegacyProvider } from './legacy/index.js';
4
+ import { buildProvider } from './provider.js';
5
+
6
+ const versions = () =>
7
+ defineVersions()
8
+ .version('0.0.0', buildLegacyProvider())
9
+ .version('1.0.0', buildProvider())
10
+ .build();
11
+
12
+ export { versions };
@@ -0,0 +1,45 @@
1
+ import type { SuiActions } from '@rango-dev/wallets-core/namespaces/sui';
2
+
3
+ import { NamespaceBuilder } from '@rango-dev/wallets-core';
4
+ import { builders as commonBuilders } from '@rango-dev/wallets-core/namespaces/common';
5
+ import { actions, builders } from '@rango-dev/wallets-core/namespaces/sui';
6
+
7
+ import { WALLET_ID, WALLET_NAME_IN_WALLET_STANDARD } from '../constants.js';
8
+ import { suiWalletInstance } from '../utils.js';
9
+
10
+ const canEagerConnect = builders
11
+ .canEagerConnect()
12
+ .action(
13
+ actions.canEagerConnect({
14
+ name: WALLET_NAME_IN_WALLET_STANDARD,
15
+ })
16
+ )
17
+ .build();
18
+
19
+ const connect = builders
20
+ .connect({
21
+ name: WALLET_NAME_IN_WALLET_STANDARD,
22
+ })
23
+ .build();
24
+
25
+ const disconnect = commonBuilders
26
+ .disconnect<SuiActions>()
27
+ /*
28
+ * This addresses a wallet bug where changing accounts within the app
29
+ * and then reconnecting results in a connection to the previously connected account.
30
+ * Explicitly calling `disconnect()` on the wallet instance ensures the wallet
31
+ * itself is disconnected, allowing for a proper connection to the intended account
32
+ * upon subsequent reconnection.
33
+ */
34
+ .before(async () => {
35
+ await suiWalletInstance()?.features['standard:disconnect'].disconnect();
36
+ })
37
+ .build();
38
+
39
+ const sui = new NamespaceBuilder<SuiActions>('Sui', WALLET_ID)
40
+ .action(connect)
41
+ .action(disconnect)
42
+ .action(canEagerConnect)
43
+ .build();
44
+
45
+ export { sui };
@@ -0,0 +1,20 @@
1
+ import { ProviderBuilder } from '@rango-dev/wallets-core';
2
+
3
+ import { metadata, WALLET_ID } from './constants.js';
4
+ import { sui } from './namespaces/sui.js';
5
+ import { suiWalletInstance } from './utils.js';
6
+
7
+ const buildProvider = () =>
8
+ new ProviderBuilder(WALLET_ID)
9
+ .init(function (context) {
10
+ const [, setState] = context.state();
11
+ if (suiWalletInstance()) {
12
+ setState('installed', true);
13
+ console.debug('[slush] instance detected.', context);
14
+ }
15
+ })
16
+ .config('metadata', metadata)
17
+ .add('sui', sui)
18
+ .build();
19
+
20
+ export { buildProvider };
package/src/signer.ts ADDED
@@ -0,0 +1,18 @@
1
+ import type { SignerFactory } from 'rango-types';
2
+
3
+ import { getInstanceOrThrow } from '@rango-dev/wallets-core/namespaces/sui';
4
+ import { dynamicImportWithRefinedError } from '@rango-dev/wallets-shared';
5
+ import { DefaultSignerFactory, TransactionType as TxType } from 'rango-types';
6
+
7
+ import { WALLET_NAME_IN_WALLET_STANDARD } from './constants.js';
8
+
9
+ export default async function getSigners(): Promise<SignerFactory> {
10
+ const suiWalletProvider = getInstanceOrThrow(WALLET_NAME_IN_WALLET_STANDARD);
11
+
12
+ const { DefaultSuiSigner } = await dynamicImportWithRefinedError(
13
+ async () => await import('@rango-dev/signer-sui')
14
+ );
15
+ const signers = new DefaultSignerFactory();
16
+ signers.registerSigner(TxType.SUI, new DefaultSuiSigner(suiWalletProvider));
17
+ return signers;
18
+ }
package/src/utils.ts ADDED
@@ -0,0 +1,27 @@
1
+ import {
2
+ type StandardConnectFeature,
3
+ type StandardDisconnectFeature,
4
+ type StandardEventsFeature,
5
+ type SuiFeatures,
6
+ type WalletWithFeatures,
7
+ } from '@mysten/wallet-standard';
8
+ import { getInstanceOrThrow } from '@rango-dev/wallets-core/namespaces/sui';
9
+
10
+ import { WALLET_NAME_IN_WALLET_STANDARD } from './constants.js';
11
+
12
+ type SuiWalletStandard = WalletWithFeatures<
13
+ StandardConnectFeature &
14
+ StandardEventsFeature &
15
+ SuiFeatures &
16
+ StandardDisconnectFeature
17
+ >;
18
+
19
+ export function suiWalletInstance(): SuiWalletStandard | null {
20
+ try {
21
+ return getInstanceOrThrow(
22
+ WALLET_NAME_IN_WALLET_STANDARD
23
+ ) as SuiWalletStandard;
24
+ } catch {
25
+ return null;
26
+ }
27
+ }