@rango-dev/provider-phantom 0.1.16-next.6 → 0.1.16-next.8
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/helpers.d.ts +2 -1
- package/dist/helpers.d.ts.map +1 -0
- package/dist/index.d.ts +13 -12
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -8
- package/dist/index.js.map +7 -0
- package/dist/signer.d.ts +3 -2
- package/dist/signer.d.ts.map +1 -0
- package/package.json +6 -8
- package/dist/provider-phantom.cjs.development.js +0 -418
- package/dist/provider-phantom.cjs.development.js.map +0 -1
- package/dist/provider-phantom.cjs.production.min.js +0 -2
- package/dist/provider-phantom.cjs.production.min.js.map +0 -1
- package/dist/provider-phantom.esm.js +0 -408
- package/dist/provider-phantom.esm.js.map +0 -1
package/dist/helpers.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export declare function phantom(): any;
|
|
1
|
+
export declare function phantom(): any;
|
|
2
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA,wBAAgB,OAAO,QAUtB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { WalletTypes, CanSwitchNetwork, Connect, Subscribe, WalletInfo } from '@rango-dev/wallets-shared';
|
|
2
|
-
import { phantom as phantom_instance } from './helpers';
|
|
3
|
-
import { SignerFactory, BlockchainMeta } from 'rango-types';
|
|
4
|
-
export declare const config: {
|
|
5
|
-
type: WalletTypes;
|
|
6
|
-
};
|
|
7
|
-
export declare const getInstance: typeof phantom_instance;
|
|
8
|
-
export declare const connect: Connect;
|
|
9
|
-
export declare const subscribe: Subscribe;
|
|
10
|
-
export declare const canSwitchNetworkTo: CanSwitchNetwork;
|
|
11
|
-
export declare const getSigners: (provider: any) => SignerFactory;
|
|
12
|
-
export declare const getWalletInfo: (allBlockChains: BlockchainMeta[]) => WalletInfo;
|
|
1
|
+
import { WalletTypes, CanSwitchNetwork, Connect, Subscribe, WalletInfo } from '@rango-dev/wallets-shared';
|
|
2
|
+
import { phantom as phantom_instance } from './helpers';
|
|
3
|
+
import { SignerFactory, BlockchainMeta } from 'rango-types';
|
|
4
|
+
export declare const config: {
|
|
5
|
+
type: WalletTypes;
|
|
6
|
+
};
|
|
7
|
+
export declare const getInstance: typeof phantom_instance;
|
|
8
|
+
export declare const connect: Connect;
|
|
9
|
+
export declare const subscribe: Subscribe;
|
|
10
|
+
export declare const canSwitchNetworkTo: CanSwitchNetwork;
|
|
11
|
+
export declare const getSigners: (provider: any) => SignerFactory;
|
|
12
|
+
export declare const getWalletInfo: (allBlockChains: BlockchainMeta[]) => WalletInfo;
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,WAAW,EACX,gBAAgB,EAChB,OAAO,EACP,SAAS,EAET,UAAU,EACX,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAExD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAoB,MAAM,aAAa,CAAC;AAI9E,eAAO,MAAM,MAAM;;CAElB,CAAC;AAEF,eAAO,MAAM,WAAW,yBAAmB,CAAC;AAC5C,eAAO,MAAM,OAAO,EAAE,OAA2B,CAAC;AAElD,eAAO,MAAM,SAAS,EAAE,SAUvB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,gBAA8B,CAAC;AAEhE,eAAO,MAAM,UAAU,EAAE,CAAC,QAAQ,EAAE,GAAG,KAAK,aAAsB,CAAC;AAEnE,eAAO,MAAM,aAAa,EAAE,CAAC,cAAc,EAAE,cAAc,EAAE,KAAK,UAgBjE,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
if (process.env.NODE_ENV === 'production') {
|
|
5
|
-
module.exports = require('./provider-phantom.cjs.production.min.js')
|
|
6
|
-
} else {
|
|
7
|
-
module.exports = require('./provider-phantom.cjs.development.js')
|
|
8
|
-
}
|
|
1
|
+
var p=Object.defineProperty;var n=(t,o)=>p(t,"name",{value:o,configurable:!0});import{Network as S,WalletTypes as w,getSolanaAccounts as u}from"@rango-dev/wallets-shared";function c(){if("phantom"in window){let t=window.phantom?.solana;if(t?.isPhantom)return t}return null}n(c,"phantom");import{DefaultSolanaSigner as l}from"@rango-dev/signer-solana";import{Network as m,getNetworkInstance as g}from"@rango-dev/wallets-shared";import{DefaultSignerFactory as h,TransactionType as f}from"rango-types";function r(t){let o=g(t,m.SOLANA),e=new h;return e.registerSigner(f.SOLANA,new l(o)),e}n(r,"getSigners");import{solanaBlockchain as k}from"rango-types";var y=w.PHANTOM,H={type:y},R=c,U=u,_=n(({instance:t,updateAccounts:o,connect:e})=>{t?.on("accountChanged",async a=>{let s=S.SOLANA;if(a){let i=a.toString();o([i])}else e(s)})},"subscribe"),q=n(()=>!1,"canSwitchNetworkTo"),z=r,G=n(t=>{let o=k(t);return{name:"Phantom",img:"https://raw.githubusercontent.com/rango-exchange/rango-types/main/assets/icons/wallets/phantom.svg",installLink:{CHROME:"https://chrome.google.com/webstore/detail/phantom/bfnaelmomeimhlpmgjnjophhpkkoljpa",DEFAULT:"https://phantom.app/"},color:"#4d40c6",supportedChains:o}},"getWalletInfo");export{q as canSwitchNetworkTo,H as config,U as connect,R as getInstance,z as getSigners,G as getWalletInfo,_ as subscribe};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/index.ts", "../src/helpers.ts", "../src/signer.ts"],
|
|
4
|
+
"sourcesContent": ["import {\n Network,\n WalletTypes,\n CanSwitchNetwork,\n Connect,\n Subscribe,\n getSolanaAccounts,\n WalletInfo,\n} from '@rango-dev/wallets-shared';\nimport { phantom as phantom_instance } from './helpers';\nimport signer from './signer';\nimport { SignerFactory, BlockchainMeta, solanaBlockchain } from 'rango-types';\n\nconst WALLET = WalletTypes.PHANTOM;\n\nexport const config = {\n type: WALLET,\n};\n\nexport const getInstance = phantom_instance;\nexport const connect: Connect = getSolanaAccounts;\n\nexport const subscribe: Subscribe = ({ instance, updateAccounts, connect }) => {\n instance?.on('accountChanged', async (publicKey: string) => {\n const network = Network.SOLANA;\n if (publicKey) {\n const account = publicKey.toString();\n updateAccounts([account]);\n } else {\n connect(network);\n }\n });\n};\n\nexport const canSwitchNetworkTo: CanSwitchNetwork = () => false;\n\nexport const getSigners: (provider: any) => SignerFactory = signer;\n\nexport const getWalletInfo: (allBlockChains: BlockchainMeta[]) => WalletInfo = (\n allBlockChains\n) => {\n const solana = solanaBlockchain(allBlockChains);\n return {\n name: 'Phantom',\n img: 'https://raw.githubusercontent.com/rango-exchange/rango-types/main/assets/icons/wallets/phantom.svg',\n installLink: {\n CHROME:\n 'https://chrome.google.com/webstore/detail/phantom/bfnaelmomeimhlpmgjnjophhpkkoljpa',\n\n DEFAULT: 'https://phantom.app/',\n },\n color: '#4d40c6',\n supportedChains: solana,\n };\n};\n", "export function phantom() {\n if ('phantom' in window) {\n const instance = window.phantom?.solana;\n\n if (instance?.isPhantom) {\n return instance;\n }\n }\n\n return null;\n}\n", "import { DefaultSolanaSigner } from '@rango-dev/signer-solana';\nimport { Network, getNetworkInstance } from '@rango-dev/wallets-shared';\nimport {\n DefaultSignerFactory,\n SignerFactory,\n TransactionType as TxType,\n} from 'rango-types';\n\nexport default function getSigners(provider: any): SignerFactory {\n const solProvider = getNetworkInstance(provider, Network.SOLANA);\n const signers = new DefaultSignerFactory();\n signers.registerSigner(TxType.SOLANA, new DefaultSolanaSigner(solProvider));\n return signers;\n}\n"],
|
|
5
|
+
"mappings": "+EAAA,OACE,WAAAA,EACA,eAAAC,EAIA,qBAAAC,MAEK,4BCRA,SAASC,GAAU,CACxB,GAAI,YAAa,OAAQ,CACvB,IAAMC,EAAW,OAAO,SAAS,OAEjC,GAAIA,GAAU,UACZ,OAAOA,EAIX,OAAO,IACT,CAVgBC,EAAAF,EAAA,WCAhB,OAAS,uBAAAG,MAA2B,2BACpC,OAAS,WAAAC,EAAS,sBAAAC,MAA0B,4BAC5C,OACE,wBAAAC,EAEA,mBAAmBC,MACd,cAEQ,SAARC,EAA4BC,EAA8B,CAC/D,IAAMC,EAAcC,EAAmBF,EAAUG,EAAQ,MAAM,EACzDC,EAAU,IAAIC,EACpB,OAAAD,EAAQ,eAAeE,EAAO,OAAQ,IAAIC,EAAoBN,CAAW,CAAC,EACnEG,CACT,CALwBI,EAAAT,EAAA,cFGxB,OAAwC,oBAAAU,MAAwB,cAEhE,IAAMC,EAASC,EAAY,QAEdC,EAAS,CACpB,KAAMF,CACR,EAEaG,EAAcC,EACdC,EAAmBC,EAEnBC,EAAuBC,EAAA,CAAC,CAAE,SAAAC,EAAU,eAAAC,EAAgB,QAAAL,CAAQ,IAAM,CAC7EI,GAAU,GAAG,iBAAkB,MAAOE,GAAsB,CAC1D,IAAMC,EAAUC,EAAQ,OACxB,GAAIF,EAAW,CACb,IAAMG,EAAUH,EAAU,SAAS,EACnCD,EAAe,CAACI,CAAO,CAAC,OAExBT,EAAQO,CAAO,CAEnB,CAAC,CACH,EAVoC,aAYvBG,EAAuCP,EAAA,IAAM,GAAN,sBAEvCQ,EAA+CA,EAE/CC,EAAkET,EAC7EU,GACG,CACH,IAAMC,EAASC,EAAiBF,CAAc,EAC9C,MAAO,CACL,KAAM,UACN,IAAK,qGACL,YAAa,CACX,OACE,qFAEF,QAAS,sBACX,EACA,MAAO,UACP,gBAAiBC,CACnB,CACF,EAhB+E",
|
|
6
|
+
"names": ["Network", "WalletTypes", "getSolanaAccounts", "phantom", "instance", "__name", "DefaultSolanaSigner", "Network", "getNetworkInstance", "DefaultSignerFactory", "TxType", "getSigners", "provider", "solProvider", "getNetworkInstance", "Network", "signers", "DefaultSignerFactory", "TxType", "DefaultSolanaSigner", "__name", "solanaBlockchain", "WALLET", "WalletTypes", "config", "getInstance", "phantom", "connect", "getSolanaAccounts", "subscribe", "__name", "instance", "updateAccounts", "publicKey", "network", "Network", "account", "canSwitchNetworkTo", "getSigners", "getWalletInfo", "allBlockChains", "solana", "solanaBlockchain"]
|
|
7
|
+
}
|
package/dist/signer.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import { SignerFactory } from 'rango-types';
|
|
2
|
-
export default function getSigners(provider: any): SignerFactory;
|
|
1
|
+
import { SignerFactory } from 'rango-types';
|
|
2
|
+
export default function getSigners(provider: any): SignerFactory;
|
|
3
|
+
//# sourceMappingURL=signer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../src/signer.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,aAAa,EAEd,MAAM,aAAa,CAAC;AAErB,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,QAAQ,EAAE,GAAG,GAAG,aAAa,CAK/D"}
|
package/package.json
CHANGED
|
@@ -1,25 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rango-dev/provider-phantom",
|
|
3
|
-
"version": "0.1.16-next.
|
|
3
|
+
"version": "0.1.16-next.8",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"module": "dist/provider-phantom.esm.js",
|
|
6
|
-
"main": "dist/index.js",
|
|
7
|
-
"typings": "dist/index.d.ts",
|
|
8
5
|
"type": "module",
|
|
6
|
+
"module": "dist/index.js",
|
|
7
|
+
"typings": "dist/index.d.ts",
|
|
9
8
|
"files": [
|
|
10
9
|
"dist",
|
|
11
10
|
"src"
|
|
12
11
|
],
|
|
13
12
|
"scripts": {
|
|
14
|
-
"
|
|
15
|
-
"build": "tsdx build --tsconfig ./tsconfig.json",
|
|
13
|
+
"build": "node ../../scripts/build/command.mjs --path wallets/provider-phantom",
|
|
16
14
|
"clean": "rimraf dist",
|
|
17
15
|
"format": "prettier --write '{.,src}/**/*.{ts,tsx}'",
|
|
18
16
|
"lint": "eslint \"**/*.{ts,tsx}\" --ignore-path ../../.eslintignore"
|
|
19
17
|
},
|
|
20
18
|
"dependencies": {
|
|
21
|
-
"@rango-dev/signer-solana": "^0.1.15-next.
|
|
22
|
-
"@rango-dev/wallets-shared": "^0.1.15-next.
|
|
19
|
+
"@rango-dev/signer-solana": "^0.1.15-next.6",
|
|
20
|
+
"@rango-dev/wallets-shared": "^0.1.15-next.7",
|
|
23
21
|
"rango-types": "^0.1.38"
|
|
24
22
|
},
|
|
25
23
|
"publishConfig": {
|
|
@@ -1,418 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var walletsShared = require('@rango-dev/wallets-shared');
|
|
6
|
-
var signerSolana = require('@rango-dev/signer-solana');
|
|
7
|
-
var rangoTypes = require('rango-types');
|
|
8
|
-
|
|
9
|
-
function _regeneratorRuntime() {
|
|
10
|
-
_regeneratorRuntime = function () {
|
|
11
|
-
return exports;
|
|
12
|
-
};
|
|
13
|
-
var exports = {},
|
|
14
|
-
Op = Object.prototype,
|
|
15
|
-
hasOwn = Op.hasOwnProperty,
|
|
16
|
-
defineProperty = Object.defineProperty || function (obj, key, desc) {
|
|
17
|
-
obj[key] = desc.value;
|
|
18
|
-
},
|
|
19
|
-
$Symbol = "function" == typeof Symbol ? Symbol : {},
|
|
20
|
-
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
|
21
|
-
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
|
22
|
-
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
23
|
-
function define(obj, key, value) {
|
|
24
|
-
return Object.defineProperty(obj, key, {
|
|
25
|
-
value: value,
|
|
26
|
-
enumerable: !0,
|
|
27
|
-
configurable: !0,
|
|
28
|
-
writable: !0
|
|
29
|
-
}), obj[key];
|
|
30
|
-
}
|
|
31
|
-
try {
|
|
32
|
-
define({}, "");
|
|
33
|
-
} catch (err) {
|
|
34
|
-
define = function (obj, key, value) {
|
|
35
|
-
return obj[key] = value;
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
39
|
-
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
|
|
40
|
-
generator = Object.create(protoGenerator.prototype),
|
|
41
|
-
context = new Context(tryLocsList || []);
|
|
42
|
-
return defineProperty(generator, "_invoke", {
|
|
43
|
-
value: makeInvokeMethod(innerFn, self, context)
|
|
44
|
-
}), generator;
|
|
45
|
-
}
|
|
46
|
-
function tryCatch(fn, obj, arg) {
|
|
47
|
-
try {
|
|
48
|
-
return {
|
|
49
|
-
type: "normal",
|
|
50
|
-
arg: fn.call(obj, arg)
|
|
51
|
-
};
|
|
52
|
-
} catch (err) {
|
|
53
|
-
return {
|
|
54
|
-
type: "throw",
|
|
55
|
-
arg: err
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
exports.wrap = wrap;
|
|
60
|
-
var ContinueSentinel = {};
|
|
61
|
-
function Generator() {}
|
|
62
|
-
function GeneratorFunction() {}
|
|
63
|
-
function GeneratorFunctionPrototype() {}
|
|
64
|
-
var IteratorPrototype = {};
|
|
65
|
-
define(IteratorPrototype, iteratorSymbol, function () {
|
|
66
|
-
return this;
|
|
67
|
-
});
|
|
68
|
-
var getProto = Object.getPrototypeOf,
|
|
69
|
-
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
70
|
-
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
|
71
|
-
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
|
72
|
-
function defineIteratorMethods(prototype) {
|
|
73
|
-
["next", "throw", "return"].forEach(function (method) {
|
|
74
|
-
define(prototype, method, function (arg) {
|
|
75
|
-
return this._invoke(method, arg);
|
|
76
|
-
});
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
function AsyncIterator(generator, PromiseImpl) {
|
|
80
|
-
function invoke(method, arg, resolve, reject) {
|
|
81
|
-
var record = tryCatch(generator[method], generator, arg);
|
|
82
|
-
if ("throw" !== record.type) {
|
|
83
|
-
var result = record.arg,
|
|
84
|
-
value = result.value;
|
|
85
|
-
return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
|
86
|
-
invoke("next", value, resolve, reject);
|
|
87
|
-
}, function (err) {
|
|
88
|
-
invoke("throw", err, resolve, reject);
|
|
89
|
-
}) : PromiseImpl.resolve(value).then(function (unwrapped) {
|
|
90
|
-
result.value = unwrapped, resolve(result);
|
|
91
|
-
}, function (error) {
|
|
92
|
-
return invoke("throw", error, resolve, reject);
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
reject(record.arg);
|
|
96
|
-
}
|
|
97
|
-
var previousPromise;
|
|
98
|
-
defineProperty(this, "_invoke", {
|
|
99
|
-
value: function (method, arg) {
|
|
100
|
-
function callInvokeWithMethodAndArg() {
|
|
101
|
-
return new PromiseImpl(function (resolve, reject) {
|
|
102
|
-
invoke(method, arg, resolve, reject);
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
function makeInvokeMethod(innerFn, self, context) {
|
|
110
|
-
var state = "suspendedStart";
|
|
111
|
-
return function (method, arg) {
|
|
112
|
-
if ("executing" === state) throw new Error("Generator is already running");
|
|
113
|
-
if ("completed" === state) {
|
|
114
|
-
if ("throw" === method) throw arg;
|
|
115
|
-
return doneResult();
|
|
116
|
-
}
|
|
117
|
-
for (context.method = method, context.arg = arg;;) {
|
|
118
|
-
var delegate = context.delegate;
|
|
119
|
-
if (delegate) {
|
|
120
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
121
|
-
if (delegateResult) {
|
|
122
|
-
if (delegateResult === ContinueSentinel) continue;
|
|
123
|
-
return delegateResult;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
|
127
|
-
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
|
128
|
-
context.dispatchException(context.arg);
|
|
129
|
-
} else "return" === context.method && context.abrupt("return", context.arg);
|
|
130
|
-
state = "executing";
|
|
131
|
-
var record = tryCatch(innerFn, self, context);
|
|
132
|
-
if ("normal" === record.type) {
|
|
133
|
-
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
|
134
|
-
return {
|
|
135
|
-
value: record.arg,
|
|
136
|
-
done: context.done
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
|
140
|
-
}
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
function maybeInvokeDelegate(delegate, context) {
|
|
144
|
-
var methodName = context.method,
|
|
145
|
-
method = delegate.iterator[methodName];
|
|
146
|
-
if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
|
|
147
|
-
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
148
|
-
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
|
149
|
-
var info = record.arg;
|
|
150
|
-
return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
|
|
151
|
-
}
|
|
152
|
-
function pushTryEntry(locs) {
|
|
153
|
-
var entry = {
|
|
154
|
-
tryLoc: locs[0]
|
|
155
|
-
};
|
|
156
|
-
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
|
|
157
|
-
}
|
|
158
|
-
function resetTryEntry(entry) {
|
|
159
|
-
var record = entry.completion || {};
|
|
160
|
-
record.type = "normal", delete record.arg, entry.completion = record;
|
|
161
|
-
}
|
|
162
|
-
function Context(tryLocsList) {
|
|
163
|
-
this.tryEntries = [{
|
|
164
|
-
tryLoc: "root"
|
|
165
|
-
}], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
|
|
166
|
-
}
|
|
167
|
-
function values(iterable) {
|
|
168
|
-
if (iterable) {
|
|
169
|
-
var iteratorMethod = iterable[iteratorSymbol];
|
|
170
|
-
if (iteratorMethod) return iteratorMethod.call(iterable);
|
|
171
|
-
if ("function" == typeof iterable.next) return iterable;
|
|
172
|
-
if (!isNaN(iterable.length)) {
|
|
173
|
-
var i = -1,
|
|
174
|
-
next = function next() {
|
|
175
|
-
for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
|
|
176
|
-
return next.value = undefined, next.done = !0, next;
|
|
177
|
-
};
|
|
178
|
-
return next.next = next;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
return {
|
|
182
|
-
next: doneResult
|
|
183
|
-
};
|
|
184
|
-
}
|
|
185
|
-
function doneResult() {
|
|
186
|
-
return {
|
|
187
|
-
value: undefined,
|
|
188
|
-
done: !0
|
|
189
|
-
};
|
|
190
|
-
}
|
|
191
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
|
|
192
|
-
value: GeneratorFunctionPrototype,
|
|
193
|
-
configurable: !0
|
|
194
|
-
}), defineProperty(GeneratorFunctionPrototype, "constructor", {
|
|
195
|
-
value: GeneratorFunction,
|
|
196
|
-
configurable: !0
|
|
197
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
|
198
|
-
var ctor = "function" == typeof genFun && genFun.constructor;
|
|
199
|
-
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
|
200
|
-
}, exports.mark = function (genFun) {
|
|
201
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
|
|
202
|
-
}, exports.awrap = function (arg) {
|
|
203
|
-
return {
|
|
204
|
-
__await: arg
|
|
205
|
-
};
|
|
206
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
207
|
-
return this;
|
|
208
|
-
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
209
|
-
void 0 === PromiseImpl && (PromiseImpl = Promise);
|
|
210
|
-
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
|
211
|
-
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
|
|
212
|
-
return result.done ? result.value : iter.next();
|
|
213
|
-
});
|
|
214
|
-
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
|
|
215
|
-
return this;
|
|
216
|
-
}), define(Gp, "toString", function () {
|
|
217
|
-
return "[object Generator]";
|
|
218
|
-
}), exports.keys = function (val) {
|
|
219
|
-
var object = Object(val),
|
|
220
|
-
keys = [];
|
|
221
|
-
for (var key in object) keys.push(key);
|
|
222
|
-
return keys.reverse(), function next() {
|
|
223
|
-
for (; keys.length;) {
|
|
224
|
-
var key = keys.pop();
|
|
225
|
-
if (key in object) return next.value = key, next.done = !1, next;
|
|
226
|
-
}
|
|
227
|
-
return next.done = !0, next;
|
|
228
|
-
};
|
|
229
|
-
}, exports.values = values, Context.prototype = {
|
|
230
|
-
constructor: Context,
|
|
231
|
-
reset: function (skipTempReset) {
|
|
232
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
|
|
233
|
-
},
|
|
234
|
-
stop: function () {
|
|
235
|
-
this.done = !0;
|
|
236
|
-
var rootRecord = this.tryEntries[0].completion;
|
|
237
|
-
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
|
238
|
-
return this.rval;
|
|
239
|
-
},
|
|
240
|
-
dispatchException: function (exception) {
|
|
241
|
-
if (this.done) throw exception;
|
|
242
|
-
var context = this;
|
|
243
|
-
function handle(loc, caught) {
|
|
244
|
-
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
|
|
245
|
-
}
|
|
246
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
247
|
-
var entry = this.tryEntries[i],
|
|
248
|
-
record = entry.completion;
|
|
249
|
-
if ("root" === entry.tryLoc) return handle("end");
|
|
250
|
-
if (entry.tryLoc <= this.prev) {
|
|
251
|
-
var hasCatch = hasOwn.call(entry, "catchLoc"),
|
|
252
|
-
hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
253
|
-
if (hasCatch && hasFinally) {
|
|
254
|
-
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
255
|
-
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
256
|
-
} else if (hasCatch) {
|
|
257
|
-
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
258
|
-
} else {
|
|
259
|
-
if (!hasFinally) throw new Error("try statement without catch or finally");
|
|
260
|
-
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
},
|
|
265
|
-
abrupt: function (type, arg) {
|
|
266
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
267
|
-
var entry = this.tryEntries[i];
|
|
268
|
-
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
|
269
|
-
var finallyEntry = entry;
|
|
270
|
-
break;
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
|
|
274
|
-
var record = finallyEntry ? finallyEntry.completion : {};
|
|
275
|
-
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
|
|
276
|
-
},
|
|
277
|
-
complete: function (record, afterLoc) {
|
|
278
|
-
if ("throw" === record.type) throw record.arg;
|
|
279
|
-
return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
|
|
280
|
-
},
|
|
281
|
-
finish: function (finallyLoc) {
|
|
282
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
283
|
-
var entry = this.tryEntries[i];
|
|
284
|
-
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
|
|
285
|
-
}
|
|
286
|
-
},
|
|
287
|
-
catch: function (tryLoc) {
|
|
288
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
289
|
-
var entry = this.tryEntries[i];
|
|
290
|
-
if (entry.tryLoc === tryLoc) {
|
|
291
|
-
var record = entry.completion;
|
|
292
|
-
if ("throw" === record.type) {
|
|
293
|
-
var thrown = record.arg;
|
|
294
|
-
resetTryEntry(entry);
|
|
295
|
-
}
|
|
296
|
-
return thrown;
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
throw new Error("illegal catch attempt");
|
|
300
|
-
},
|
|
301
|
-
delegateYield: function (iterable, resultName, nextLoc) {
|
|
302
|
-
return this.delegate = {
|
|
303
|
-
iterator: values(iterable),
|
|
304
|
-
resultName: resultName,
|
|
305
|
-
nextLoc: nextLoc
|
|
306
|
-
}, "next" === this.method && (this.arg = undefined), ContinueSentinel;
|
|
307
|
-
}
|
|
308
|
-
}, exports;
|
|
309
|
-
}
|
|
310
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
311
|
-
try {
|
|
312
|
-
var info = gen[key](arg);
|
|
313
|
-
var value = info.value;
|
|
314
|
-
} catch (error) {
|
|
315
|
-
reject(error);
|
|
316
|
-
return;
|
|
317
|
-
}
|
|
318
|
-
if (info.done) {
|
|
319
|
-
resolve(value);
|
|
320
|
-
} else {
|
|
321
|
-
Promise.resolve(value).then(_next, _throw);
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
function _asyncToGenerator(fn) {
|
|
325
|
-
return function () {
|
|
326
|
-
var self = this,
|
|
327
|
-
args = arguments;
|
|
328
|
-
return new Promise(function (resolve, reject) {
|
|
329
|
-
var gen = fn.apply(self, args);
|
|
330
|
-
function _next(value) {
|
|
331
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
332
|
-
}
|
|
333
|
-
function _throw(err) {
|
|
334
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
335
|
-
}
|
|
336
|
-
_next(undefined);
|
|
337
|
-
});
|
|
338
|
-
};
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
function phantom() {
|
|
342
|
-
if ('phantom' in window) {
|
|
343
|
-
var _window$phantom;
|
|
344
|
-
var instance = (_window$phantom = window.phantom) == null ? void 0 : _window$phantom.solana;
|
|
345
|
-
if (instance != null && instance.isPhantom) {
|
|
346
|
-
return instance;
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
return null;
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
function getSigners(provider) {
|
|
353
|
-
var solProvider = walletsShared.getNetworkInstance(provider, walletsShared.Network.SOLANA);
|
|
354
|
-
var signers = new rangoTypes.DefaultSignerFactory();
|
|
355
|
-
signers.registerSigner(rangoTypes.TransactionType.SOLANA, new signerSolana.DefaultSolanaSigner(solProvider));
|
|
356
|
-
return signers;
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
var WALLET = walletsShared.WalletTypes.PHANTOM;
|
|
360
|
-
var config = {
|
|
361
|
-
type: WALLET
|
|
362
|
-
};
|
|
363
|
-
var getInstance = phantom;
|
|
364
|
-
var connect = walletsShared.getSolanaAccounts;
|
|
365
|
-
var subscribe = function subscribe(_ref) {
|
|
366
|
-
var instance = _ref.instance,
|
|
367
|
-
updateAccounts = _ref.updateAccounts,
|
|
368
|
-
connect = _ref.connect;
|
|
369
|
-
instance == null ? void 0 : instance.on('accountChanged', /*#__PURE__*/function () {
|
|
370
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(publicKey) {
|
|
371
|
-
var network, account;
|
|
372
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
373
|
-
while (1) switch (_context.prev = _context.next) {
|
|
374
|
-
case 0:
|
|
375
|
-
network = walletsShared.Network.SOLANA;
|
|
376
|
-
if (publicKey) {
|
|
377
|
-
account = publicKey.toString();
|
|
378
|
-
updateAccounts([account]);
|
|
379
|
-
} else {
|
|
380
|
-
connect(network);
|
|
381
|
-
}
|
|
382
|
-
case 2:
|
|
383
|
-
case "end":
|
|
384
|
-
return _context.stop();
|
|
385
|
-
}
|
|
386
|
-
}, _callee);
|
|
387
|
-
}));
|
|
388
|
-
return function (_x) {
|
|
389
|
-
return _ref2.apply(this, arguments);
|
|
390
|
-
};
|
|
391
|
-
}());
|
|
392
|
-
};
|
|
393
|
-
var canSwitchNetworkTo = function canSwitchNetworkTo() {
|
|
394
|
-
return false;
|
|
395
|
-
};
|
|
396
|
-
var getSigners$1 = getSigners;
|
|
397
|
-
var getWalletInfo = function getWalletInfo(allBlockChains) {
|
|
398
|
-
var solana = rangoTypes.solanaBlockchain(allBlockChains);
|
|
399
|
-
return {
|
|
400
|
-
name: 'Phantom',
|
|
401
|
-
img: 'https://raw.githubusercontent.com/rango-exchange/rango-types/main/assets/icons/wallets/phantom.svg',
|
|
402
|
-
installLink: {
|
|
403
|
-
CHROME: 'https://chrome.google.com/webstore/detail/phantom/bfnaelmomeimhlpmgjnjophhpkkoljpa',
|
|
404
|
-
DEFAULT: 'https://phantom.app/'
|
|
405
|
-
},
|
|
406
|
-
color: '#4d40c6',
|
|
407
|
-
supportedChains: solana
|
|
408
|
-
};
|
|
409
|
-
};
|
|
410
|
-
|
|
411
|
-
exports.canSwitchNetworkTo = canSwitchNetworkTo;
|
|
412
|
-
exports.config = config;
|
|
413
|
-
exports.connect = connect;
|
|
414
|
-
exports.getInstance = getInstance;
|
|
415
|
-
exports.getSigners = getSigners$1;
|
|
416
|
-
exports.getWalletInfo = getWalletInfo;
|
|
417
|
-
exports.subscribe = subscribe;
|
|
418
|
-
//# sourceMappingURL=provider-phantom.cjs.development.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"provider-phantom.cjs.development.js","sources":["../src/helpers.ts","../src/signer.ts","../src/index.ts"],"sourcesContent":["export function phantom() {\n if ('phantom' in window) {\n const instance = window.phantom?.solana;\n\n if (instance?.isPhantom) {\n return instance;\n }\n }\n\n return null;\n}\n","import { DefaultSolanaSigner } from '@rango-dev/signer-solana';\nimport { Network, getNetworkInstance } from '@rango-dev/wallets-shared';\nimport {\n DefaultSignerFactory,\n SignerFactory,\n TransactionType as TxType,\n} from 'rango-types';\n\nexport default function getSigners(provider: any): SignerFactory {\n const solProvider = getNetworkInstance(provider, Network.SOLANA);\n const signers = new DefaultSignerFactory();\n signers.registerSigner(TxType.SOLANA, new DefaultSolanaSigner(solProvider));\n return signers;\n}\n","import {\n Network,\n WalletTypes,\n CanSwitchNetwork,\n Connect,\n Subscribe,\n getSolanaAccounts,\n WalletInfo,\n} from '@rango-dev/wallets-shared';\nimport { phantom as phantom_instance } from './helpers';\nimport signer from './signer';\nimport { SignerFactory, BlockchainMeta, solanaBlockchain } from 'rango-types';\n\nconst WALLET = WalletTypes.PHANTOM;\n\nexport const config = {\n type: WALLET,\n};\n\nexport const getInstance = phantom_instance;\nexport const connect: Connect = getSolanaAccounts;\n\nexport const subscribe: Subscribe = ({ instance, updateAccounts, connect }) => {\n instance?.on('accountChanged', async (publicKey: string) => {\n const network = Network.SOLANA;\n if (publicKey) {\n const account = publicKey.toString();\n updateAccounts([account]);\n } else {\n connect(network);\n }\n });\n};\n\nexport const canSwitchNetworkTo: CanSwitchNetwork = () => false;\n\nexport const getSigners: (provider: any) => SignerFactory = signer;\n\nexport const getWalletInfo: (allBlockChains: BlockchainMeta[]) => WalletInfo = (\n allBlockChains\n) => {\n const solana = solanaBlockchain(allBlockChains);\n return {\n name: 'Phantom',\n img: 'https://raw.githubusercontent.com/rango-exchange/rango-types/main/assets/icons/wallets/phantom.svg',\n installLink: {\n CHROME:\n 'https://chrome.google.com/webstore/detail/phantom/bfnaelmomeimhlpmgjnjophhpkkoljpa',\n\n DEFAULT: 'https://phantom.app/',\n },\n color: '#4d40c6',\n supportedChains: solana,\n };\n};\n"],"names":["phantom","window","_window$phantom","instance","solana","isPhantom","getSigners","provider","solProvider","getNetworkInstance","Network","SOLANA","signers","DefaultSignerFactory","registerSigner","TxType","DefaultSolanaSigner","WALLET","WalletTypes","PHANTOM","config","type","getInstance","phantom_instance","connect","getSolanaAccounts","subscribe","_ref","updateAccounts","on","_ref2","_asyncToGenerator","_regeneratorRuntime","mark","_callee","publicKey","network","account","wrap","_callee$","_context","prev","next","toString","stop","_x","apply","arguments","canSwitchNetworkTo","signer","getWalletInfo","allBlockChains","solanaBlockchain","name","img","installLink","CHROME","DEFAULT","color","supportedChains"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAAgBA,OAAOA;EACrB,IAAI,SAAS,IAAIC,MAAM,EAAE;IAAA,IAAAC,eAAA;IACvB,IAAMC,QAAQ,IAAAD,eAAA,GAAGD,MAAM,CAACD,OAAO,qBAAdE,eAAA,CAAgBE,MAAM;IAEvC,IAAID,QAAQ,YAARA,QAAQ,CAAEE,SAAS,EAAE;MACvB,OAAOF,QAAQ;;;EAInB,OAAO,IAAI;AACb;;SCFwBG,UAAUA,CAACC,QAAa;EAC9C,IAAMC,WAAW,GAAGC,gCAAkB,CAACF,QAAQ,EAAEG,qBAAO,CAACC,MAAM,CAAC;EAChE,IAAMC,OAAO,GAAG,IAAIC,+BAAoB,EAAE;EAC1CD,OAAO,CAACE,cAAc,CAACC,0BAAM,CAACJ,MAAM,EAAE,IAAIK,gCAAmB,CAACR,WAAW,CAAC,CAAC;EAC3E,OAAOI,OAAO;AAChB;;ACAA,IAAMK,MAAM,GAAGC,yBAAW,CAACC,OAAO;AAElC,IAAaC,MAAM,GAAG;EACpBC,IAAI,EAAEJ;CACP;AAED,IAAaK,WAAW,GAAGC;AAC3B,IAAaC,OAAO,GAAYC;AAEhC,IAAaC,SAAS,GAAc,SAAvBA,SAASA,CAAAC,IAAA;MAAiBxB,QAAQ,GAAAwB,IAAA,CAARxB,QAAQ;IAAEyB,cAAc,GAAAD,IAAA,CAAdC,cAAc;IAAEJ,OAAO,GAAAG,IAAA,CAAPH,OAAO;EACtErB,QAAQ,oBAARA,QAAQ,CAAE0B,EAAE,CAAC,gBAAgB;IAAA,IAAAC,KAAA,GAAAC,iBAAA,eAAAC,mBAAA,GAAAC,IAAA,CAAE,SAAAC,QAAOC,SAAiB;MAAA,IAAAC,OAAA,EAAAC,OAAA;MAAA,OAAAL,mBAAA,GAAAM,IAAA,UAAAC,SAAAC,QAAA;QAAA,kBAAAA,QAAA,CAAAC,IAAA,GAAAD,QAAA,CAAAE,IAAA;UAAA;YAC/CN,OAAO,GAAG1B,qBAAO,CAACC,MAAM;YAC9B,IAAIwB,SAAS,EAAE;cACPE,OAAO,GAAGF,SAAS,CAACQ,QAAQ,EAAE;cACpCf,cAAc,CAAC,CAACS,OAAO,CAAC,CAAC;aAC1B,MAAM;cACLb,OAAO,CAACY,OAAO,CAAC;;UACjB;UAAA;YAAA,OAAAI,QAAA,CAAAI,IAAA;;SAAAV,OAAA;KACF;IAAA,iBAAAW,EAAA;MAAA,OAAAf,KAAA,CAAAgB,KAAA,OAAAC,SAAA;;MAAC;AACJ,CAAC;AAED,IAAaC,kBAAkB,GAAqB,SAAvCA,kBAAkBA;EAAA,OAA2B,KAAK;AAAA;AAE/D,IAAa1C,YAAU,GAAqC2C;AAE5D,IAAaC,aAAa,GAAqD,SAAlEA,aAAaA,CACxBC,cAAc;EAEd,IAAM/C,MAAM,GAAGgD,2BAAgB,CAACD,cAAc,CAAC;EAC/C,OAAO;IACLE,IAAI,EAAE,SAAS;IACfC,GAAG,EAAE,oGAAoG;IACzGC,WAAW,EAAE;MACXC,MAAM,EACJ,oFAAoF;MAEtFC,OAAO,EAAE;KACV;IACDC,KAAK,EAAE,SAAS;IAChBC,eAAe,EAAEvD;GAClB;AACH,CAAC;;;;;;;;;;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@rango-dev/wallets-shared"),e=require("@rango-dev/signer-solana"),r=require("rango-types");function n(){n=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var i=Object.create((e&&e.prototype instanceof p?e:p).prototype),a=new j(n||[]);return o(i,"_invoke",{value:b(t,r,a)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var f={};function p(){}function v(){}function d(){}var y={};s(y,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(k([])));m&&m!==e&&r.call(m,a)&&(y=m);var w=d.prototype=p.prototype=Object.create(y);function x(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){var n;o(this,"_invoke",{value:function(o,i){function a(){return new e((function(n,a){!function n(o,i,a,c){var u=h(t[o],t,i);if("throw"!==u.type){var s=u.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}(o,i,n,a)}))}return n=n?n.then(a,a):a()}})}function b(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=E(a,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function E(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=h(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function k(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:_}}function _(){return{value:void 0,done:!0}}return v.prototype=d,o(w,"constructor",{value:d,configurable:!0}),o(d,"constructor",{value:v,configurable:!0}),v.displayName=s(d,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,u,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},x(L.prototype),s(L.prototype,c,(function(){return this})),t.AsyncIterator=L,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new L(l(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},x(w),s(w,u,"Generator"),s(w,a,(function(){return this})),s(w,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=k,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:k(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function o(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}var i={type:t.WalletTypes.PHANTOM},a=t.getSolanaAccounts;exports.canSwitchNetworkTo=function(){return!1},exports.config=i,exports.connect=a,exports.getInstance=function(){if("phantom"in window){var t,e=null==(t=window.phantom)?void 0:t.solana;if(null!=e&&e.isPhantom)return e}return null},exports.getSigners=function(n){var o=t.getNetworkInstance(n,t.Network.SOLANA),i=new r.DefaultSignerFactory;return i.registerSigner(r.TransactionType.SOLANA,new e.DefaultSolanaSigner(o)),i},exports.getWalletInfo=function(t){return{name:"Phantom",img:"https://raw.githubusercontent.com/rango-exchange/rango-types/main/assets/icons/wallets/phantom.svg",installLink:{CHROME:"https://chrome.google.com/webstore/detail/phantom/bfnaelmomeimhlpmgjnjophhpkkoljpa",DEFAULT:"https://phantom.app/"},color:"#4d40c6",supportedChains:r.solanaBlockchain(t)}},exports.subscribe=function(e){var r=e.instance,i=e.updateAccounts,a=e.connect;null==r||r.on("accountChanged",function(){var e,r=(e=n().mark((function e(r){var o,c;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=t.Network.SOLANA,r?(c=r.toString(),i([c])):a(o);case 2:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function c(t){o(a,n,i,c,u,"next",t)}function u(t){o(a,n,i,c,u,"throw",t)}c(void 0)}))});return function(t){return r.apply(this,arguments)}}())};
|
|
2
|
-
//# sourceMappingURL=provider-phantom.cjs.production.min.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"provider-phantom.cjs.production.min.js","sources":["../src/index.ts","../src/helpers.ts","../src/signer.ts"],"sourcesContent":["import {\n Network,\n WalletTypes,\n CanSwitchNetwork,\n Connect,\n Subscribe,\n getSolanaAccounts,\n WalletInfo,\n} from '@rango-dev/wallets-shared';\nimport { phantom as phantom_instance } from './helpers';\nimport signer from './signer';\nimport { SignerFactory, BlockchainMeta, solanaBlockchain } from 'rango-types';\n\nconst WALLET = WalletTypes.PHANTOM;\n\nexport const config = {\n type: WALLET,\n};\n\nexport const getInstance = phantom_instance;\nexport const connect: Connect = getSolanaAccounts;\n\nexport const subscribe: Subscribe = ({ instance, updateAccounts, connect }) => {\n instance?.on('accountChanged', async (publicKey: string) => {\n const network = Network.SOLANA;\n if (publicKey) {\n const account = publicKey.toString();\n updateAccounts([account]);\n } else {\n connect(network);\n }\n });\n};\n\nexport const canSwitchNetworkTo: CanSwitchNetwork = () => false;\n\nexport const getSigners: (provider: any) => SignerFactory = signer;\n\nexport const getWalletInfo: (allBlockChains: BlockchainMeta[]) => WalletInfo = (\n allBlockChains\n) => {\n const solana = solanaBlockchain(allBlockChains);\n return {\n name: 'Phantom',\n img: 'https://raw.githubusercontent.com/rango-exchange/rango-types/main/assets/icons/wallets/phantom.svg',\n installLink: {\n CHROME:\n 'https://chrome.google.com/webstore/detail/phantom/bfnaelmomeimhlpmgjnjophhpkkoljpa',\n\n DEFAULT: 'https://phantom.app/',\n },\n color: '#4d40c6',\n supportedChains: solana,\n };\n};\n","export function phantom() {\n if ('phantom' in window) {\n const instance = window.phantom?.solana;\n\n if (instance?.isPhantom) {\n return instance;\n }\n }\n\n return null;\n}\n","import { DefaultSolanaSigner } from '@rango-dev/signer-solana';\nimport { Network, getNetworkInstance } from '@rango-dev/wallets-shared';\nimport {\n DefaultSignerFactory,\n SignerFactory,\n TransactionType as TxType,\n} from 'rango-types';\n\nexport default function getSigners(provider: any): SignerFactory {\n const solProvider = getNetworkInstance(provider, Network.SOLANA);\n const signers = new DefaultSignerFactory();\n signers.registerSigner(TxType.SOLANA, new DefaultSolanaSigner(solProvider));\n return signers;\n}\n"],"names":["config","type","WalletTypes","PHANTOM","connect","getSolanaAccounts","window","_window$phantom","instance","phantom","solana","isPhantom","provider","solProvider","getNetworkInstance","Network","SOLANA","signers","DefaultSignerFactory","registerSigner","TxType","DefaultSolanaSigner","allBlockChains","name","img","installLink","CHROME","DEFAULT","color","supportedChains","solanaBlockchain","_ref","updateAccounts","on","_ref2","_regeneratorRuntime","mark","_callee","publicKey","network","account","wrap","_context","prev","next","toString","stop","_x","apply","arguments"],"mappings":"8uNAaA,IAEaA,EAAS,CACpBC,KAHaC,cAAYC,SAOdC,EAAmBC,+CAcoB,WAArB,OAA2B,qECjCxD,GAAI,YAAaC,OAAQ,CAAA,IAAAC,EACjBC,SAAQD,EAAGD,OAAOG,gBAAPF,EAAgBG,OAEjC,SAAIF,GAAAA,EAAUG,UACZ,OAAOH,EAIX,OAAO,kCCD0BI,GACjC,IAAMC,EAAcC,qBAAmBF,EAAUG,UAAQC,QACnDC,EAAU,IAAIC,uBAEpB,OADAD,EAAQE,eAAeC,kBAAOJ,OAAQ,IAAIK,sBAAoBR,IACvDI,yBF0BsE,SAC7EK,GAGA,MAAO,CACLC,KAAM,UACNC,IAAK,qGACLC,YAAa,CACXC,OACE,qFAEFC,QAAS,wBAEXC,MAAO,UACPC,gBAXaC,mBAAiBR,uBAnBE,SAAdS,OAAiBvB,EAAQuB,EAARvB,SAAUwB,EAAcD,EAAdC,eAAgB5B,EAAO2B,EAAP3B,cAC/DI,GAAAA,EAAUyB,GAAG,4BAAgB,MAAAC,KAAAC,IAAAC,MAAE,SAAAC,EAAOC,GAAiB,IAAAC,EAAAC,EAAA,OAAAL,IAAAM,eAAAC,GAAA,cAAAA,EAAAC,KAAAD,EAAAE,MAAA,OAC/CL,EAAUxB,UAAQC,OACpBsB,GACIE,EAAUF,EAAUO,WAC1Bb,EAAe,CAACQ,KAEhBpC,EAAQmC,GACT,OAAA,UAAA,OAAAG,EAAAI,UAAAT,qLACF,gBAAAU,GAAA,OAAAb,EAAAc,WAAAC"}
|
|
@@ -1,408 +0,0 @@
|
|
|
1
|
-
import { getNetworkInstance, Network, getSolanaAccounts, WalletTypes } from '@rango-dev/wallets-shared';
|
|
2
|
-
import { DefaultSolanaSigner } from '@rango-dev/signer-solana';
|
|
3
|
-
import { DefaultSignerFactory, TransactionType, solanaBlockchain } from 'rango-types';
|
|
4
|
-
|
|
5
|
-
function _regeneratorRuntime() {
|
|
6
|
-
_regeneratorRuntime = function () {
|
|
7
|
-
return exports;
|
|
8
|
-
};
|
|
9
|
-
var exports = {},
|
|
10
|
-
Op = Object.prototype,
|
|
11
|
-
hasOwn = Op.hasOwnProperty,
|
|
12
|
-
defineProperty = Object.defineProperty || function (obj, key, desc) {
|
|
13
|
-
obj[key] = desc.value;
|
|
14
|
-
},
|
|
15
|
-
$Symbol = "function" == typeof Symbol ? Symbol : {},
|
|
16
|
-
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
|
17
|
-
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
|
18
|
-
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
19
|
-
function define(obj, key, value) {
|
|
20
|
-
return Object.defineProperty(obj, key, {
|
|
21
|
-
value: value,
|
|
22
|
-
enumerable: !0,
|
|
23
|
-
configurable: !0,
|
|
24
|
-
writable: !0
|
|
25
|
-
}), obj[key];
|
|
26
|
-
}
|
|
27
|
-
try {
|
|
28
|
-
define({}, "");
|
|
29
|
-
} catch (err) {
|
|
30
|
-
define = function (obj, key, value) {
|
|
31
|
-
return obj[key] = value;
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
35
|
-
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
|
|
36
|
-
generator = Object.create(protoGenerator.prototype),
|
|
37
|
-
context = new Context(tryLocsList || []);
|
|
38
|
-
return defineProperty(generator, "_invoke", {
|
|
39
|
-
value: makeInvokeMethod(innerFn, self, context)
|
|
40
|
-
}), generator;
|
|
41
|
-
}
|
|
42
|
-
function tryCatch(fn, obj, arg) {
|
|
43
|
-
try {
|
|
44
|
-
return {
|
|
45
|
-
type: "normal",
|
|
46
|
-
arg: fn.call(obj, arg)
|
|
47
|
-
};
|
|
48
|
-
} catch (err) {
|
|
49
|
-
return {
|
|
50
|
-
type: "throw",
|
|
51
|
-
arg: err
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
exports.wrap = wrap;
|
|
56
|
-
var ContinueSentinel = {};
|
|
57
|
-
function Generator() {}
|
|
58
|
-
function GeneratorFunction() {}
|
|
59
|
-
function GeneratorFunctionPrototype() {}
|
|
60
|
-
var IteratorPrototype = {};
|
|
61
|
-
define(IteratorPrototype, iteratorSymbol, function () {
|
|
62
|
-
return this;
|
|
63
|
-
});
|
|
64
|
-
var getProto = Object.getPrototypeOf,
|
|
65
|
-
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
66
|
-
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
|
67
|
-
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
|
68
|
-
function defineIteratorMethods(prototype) {
|
|
69
|
-
["next", "throw", "return"].forEach(function (method) {
|
|
70
|
-
define(prototype, method, function (arg) {
|
|
71
|
-
return this._invoke(method, arg);
|
|
72
|
-
});
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
function AsyncIterator(generator, PromiseImpl) {
|
|
76
|
-
function invoke(method, arg, resolve, reject) {
|
|
77
|
-
var record = tryCatch(generator[method], generator, arg);
|
|
78
|
-
if ("throw" !== record.type) {
|
|
79
|
-
var result = record.arg,
|
|
80
|
-
value = result.value;
|
|
81
|
-
return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
|
82
|
-
invoke("next", value, resolve, reject);
|
|
83
|
-
}, function (err) {
|
|
84
|
-
invoke("throw", err, resolve, reject);
|
|
85
|
-
}) : PromiseImpl.resolve(value).then(function (unwrapped) {
|
|
86
|
-
result.value = unwrapped, resolve(result);
|
|
87
|
-
}, function (error) {
|
|
88
|
-
return invoke("throw", error, resolve, reject);
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
reject(record.arg);
|
|
92
|
-
}
|
|
93
|
-
var previousPromise;
|
|
94
|
-
defineProperty(this, "_invoke", {
|
|
95
|
-
value: function (method, arg) {
|
|
96
|
-
function callInvokeWithMethodAndArg() {
|
|
97
|
-
return new PromiseImpl(function (resolve, reject) {
|
|
98
|
-
invoke(method, arg, resolve, reject);
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
function makeInvokeMethod(innerFn, self, context) {
|
|
106
|
-
var state = "suspendedStart";
|
|
107
|
-
return function (method, arg) {
|
|
108
|
-
if ("executing" === state) throw new Error("Generator is already running");
|
|
109
|
-
if ("completed" === state) {
|
|
110
|
-
if ("throw" === method) throw arg;
|
|
111
|
-
return doneResult();
|
|
112
|
-
}
|
|
113
|
-
for (context.method = method, context.arg = arg;;) {
|
|
114
|
-
var delegate = context.delegate;
|
|
115
|
-
if (delegate) {
|
|
116
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
117
|
-
if (delegateResult) {
|
|
118
|
-
if (delegateResult === ContinueSentinel) continue;
|
|
119
|
-
return delegateResult;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
|
123
|
-
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
|
124
|
-
context.dispatchException(context.arg);
|
|
125
|
-
} else "return" === context.method && context.abrupt("return", context.arg);
|
|
126
|
-
state = "executing";
|
|
127
|
-
var record = tryCatch(innerFn, self, context);
|
|
128
|
-
if ("normal" === record.type) {
|
|
129
|
-
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
|
130
|
-
return {
|
|
131
|
-
value: record.arg,
|
|
132
|
-
done: context.done
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
function maybeInvokeDelegate(delegate, context) {
|
|
140
|
-
var methodName = context.method,
|
|
141
|
-
method = delegate.iterator[methodName];
|
|
142
|
-
if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
|
|
143
|
-
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
144
|
-
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
|
145
|
-
var info = record.arg;
|
|
146
|
-
return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
|
|
147
|
-
}
|
|
148
|
-
function pushTryEntry(locs) {
|
|
149
|
-
var entry = {
|
|
150
|
-
tryLoc: locs[0]
|
|
151
|
-
};
|
|
152
|
-
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
|
|
153
|
-
}
|
|
154
|
-
function resetTryEntry(entry) {
|
|
155
|
-
var record = entry.completion || {};
|
|
156
|
-
record.type = "normal", delete record.arg, entry.completion = record;
|
|
157
|
-
}
|
|
158
|
-
function Context(tryLocsList) {
|
|
159
|
-
this.tryEntries = [{
|
|
160
|
-
tryLoc: "root"
|
|
161
|
-
}], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
|
|
162
|
-
}
|
|
163
|
-
function values(iterable) {
|
|
164
|
-
if (iterable) {
|
|
165
|
-
var iteratorMethod = iterable[iteratorSymbol];
|
|
166
|
-
if (iteratorMethod) return iteratorMethod.call(iterable);
|
|
167
|
-
if ("function" == typeof iterable.next) return iterable;
|
|
168
|
-
if (!isNaN(iterable.length)) {
|
|
169
|
-
var i = -1,
|
|
170
|
-
next = function next() {
|
|
171
|
-
for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
|
|
172
|
-
return next.value = undefined, next.done = !0, next;
|
|
173
|
-
};
|
|
174
|
-
return next.next = next;
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
return {
|
|
178
|
-
next: doneResult
|
|
179
|
-
};
|
|
180
|
-
}
|
|
181
|
-
function doneResult() {
|
|
182
|
-
return {
|
|
183
|
-
value: undefined,
|
|
184
|
-
done: !0
|
|
185
|
-
};
|
|
186
|
-
}
|
|
187
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
|
|
188
|
-
value: GeneratorFunctionPrototype,
|
|
189
|
-
configurable: !0
|
|
190
|
-
}), defineProperty(GeneratorFunctionPrototype, "constructor", {
|
|
191
|
-
value: GeneratorFunction,
|
|
192
|
-
configurable: !0
|
|
193
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
|
194
|
-
var ctor = "function" == typeof genFun && genFun.constructor;
|
|
195
|
-
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
|
196
|
-
}, exports.mark = function (genFun) {
|
|
197
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
|
|
198
|
-
}, exports.awrap = function (arg) {
|
|
199
|
-
return {
|
|
200
|
-
__await: arg
|
|
201
|
-
};
|
|
202
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
203
|
-
return this;
|
|
204
|
-
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
205
|
-
void 0 === PromiseImpl && (PromiseImpl = Promise);
|
|
206
|
-
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
|
207
|
-
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
|
|
208
|
-
return result.done ? result.value : iter.next();
|
|
209
|
-
});
|
|
210
|
-
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
|
|
211
|
-
return this;
|
|
212
|
-
}), define(Gp, "toString", function () {
|
|
213
|
-
return "[object Generator]";
|
|
214
|
-
}), exports.keys = function (val) {
|
|
215
|
-
var object = Object(val),
|
|
216
|
-
keys = [];
|
|
217
|
-
for (var key in object) keys.push(key);
|
|
218
|
-
return keys.reverse(), function next() {
|
|
219
|
-
for (; keys.length;) {
|
|
220
|
-
var key = keys.pop();
|
|
221
|
-
if (key in object) return next.value = key, next.done = !1, next;
|
|
222
|
-
}
|
|
223
|
-
return next.done = !0, next;
|
|
224
|
-
};
|
|
225
|
-
}, exports.values = values, Context.prototype = {
|
|
226
|
-
constructor: Context,
|
|
227
|
-
reset: function (skipTempReset) {
|
|
228
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
|
|
229
|
-
},
|
|
230
|
-
stop: function () {
|
|
231
|
-
this.done = !0;
|
|
232
|
-
var rootRecord = this.tryEntries[0].completion;
|
|
233
|
-
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
|
234
|
-
return this.rval;
|
|
235
|
-
},
|
|
236
|
-
dispatchException: function (exception) {
|
|
237
|
-
if (this.done) throw exception;
|
|
238
|
-
var context = this;
|
|
239
|
-
function handle(loc, caught) {
|
|
240
|
-
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
|
|
241
|
-
}
|
|
242
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
243
|
-
var entry = this.tryEntries[i],
|
|
244
|
-
record = entry.completion;
|
|
245
|
-
if ("root" === entry.tryLoc) return handle("end");
|
|
246
|
-
if (entry.tryLoc <= this.prev) {
|
|
247
|
-
var hasCatch = hasOwn.call(entry, "catchLoc"),
|
|
248
|
-
hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
249
|
-
if (hasCatch && hasFinally) {
|
|
250
|
-
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
251
|
-
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
252
|
-
} else if (hasCatch) {
|
|
253
|
-
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
254
|
-
} else {
|
|
255
|
-
if (!hasFinally) throw new Error("try statement without catch or finally");
|
|
256
|
-
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
},
|
|
261
|
-
abrupt: function (type, arg) {
|
|
262
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
263
|
-
var entry = this.tryEntries[i];
|
|
264
|
-
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
|
265
|
-
var finallyEntry = entry;
|
|
266
|
-
break;
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
|
|
270
|
-
var record = finallyEntry ? finallyEntry.completion : {};
|
|
271
|
-
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
|
|
272
|
-
},
|
|
273
|
-
complete: function (record, afterLoc) {
|
|
274
|
-
if ("throw" === record.type) throw record.arg;
|
|
275
|
-
return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
|
|
276
|
-
},
|
|
277
|
-
finish: function (finallyLoc) {
|
|
278
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
279
|
-
var entry = this.tryEntries[i];
|
|
280
|
-
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
|
|
281
|
-
}
|
|
282
|
-
},
|
|
283
|
-
catch: function (tryLoc) {
|
|
284
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
285
|
-
var entry = this.tryEntries[i];
|
|
286
|
-
if (entry.tryLoc === tryLoc) {
|
|
287
|
-
var record = entry.completion;
|
|
288
|
-
if ("throw" === record.type) {
|
|
289
|
-
var thrown = record.arg;
|
|
290
|
-
resetTryEntry(entry);
|
|
291
|
-
}
|
|
292
|
-
return thrown;
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
throw new Error("illegal catch attempt");
|
|
296
|
-
},
|
|
297
|
-
delegateYield: function (iterable, resultName, nextLoc) {
|
|
298
|
-
return this.delegate = {
|
|
299
|
-
iterator: values(iterable),
|
|
300
|
-
resultName: resultName,
|
|
301
|
-
nextLoc: nextLoc
|
|
302
|
-
}, "next" === this.method && (this.arg = undefined), ContinueSentinel;
|
|
303
|
-
}
|
|
304
|
-
}, exports;
|
|
305
|
-
}
|
|
306
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
307
|
-
try {
|
|
308
|
-
var info = gen[key](arg);
|
|
309
|
-
var value = info.value;
|
|
310
|
-
} catch (error) {
|
|
311
|
-
reject(error);
|
|
312
|
-
return;
|
|
313
|
-
}
|
|
314
|
-
if (info.done) {
|
|
315
|
-
resolve(value);
|
|
316
|
-
} else {
|
|
317
|
-
Promise.resolve(value).then(_next, _throw);
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
function _asyncToGenerator(fn) {
|
|
321
|
-
return function () {
|
|
322
|
-
var self = this,
|
|
323
|
-
args = arguments;
|
|
324
|
-
return new Promise(function (resolve, reject) {
|
|
325
|
-
var gen = fn.apply(self, args);
|
|
326
|
-
function _next(value) {
|
|
327
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
328
|
-
}
|
|
329
|
-
function _throw(err) {
|
|
330
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
331
|
-
}
|
|
332
|
-
_next(undefined);
|
|
333
|
-
});
|
|
334
|
-
};
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
function phantom() {
|
|
338
|
-
if ('phantom' in window) {
|
|
339
|
-
var _window$phantom;
|
|
340
|
-
var instance = (_window$phantom = window.phantom) == null ? void 0 : _window$phantom.solana;
|
|
341
|
-
if (instance != null && instance.isPhantom) {
|
|
342
|
-
return instance;
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
return null;
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
function getSigners(provider) {
|
|
349
|
-
var solProvider = getNetworkInstance(provider, Network.SOLANA);
|
|
350
|
-
var signers = new DefaultSignerFactory();
|
|
351
|
-
signers.registerSigner(TransactionType.SOLANA, new DefaultSolanaSigner(solProvider));
|
|
352
|
-
return signers;
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
var WALLET = WalletTypes.PHANTOM;
|
|
356
|
-
var config = {
|
|
357
|
-
type: WALLET
|
|
358
|
-
};
|
|
359
|
-
var getInstance = phantom;
|
|
360
|
-
var connect = getSolanaAccounts;
|
|
361
|
-
var subscribe = function subscribe(_ref) {
|
|
362
|
-
var instance = _ref.instance,
|
|
363
|
-
updateAccounts = _ref.updateAccounts,
|
|
364
|
-
connect = _ref.connect;
|
|
365
|
-
instance == null ? void 0 : instance.on('accountChanged', /*#__PURE__*/function () {
|
|
366
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(publicKey) {
|
|
367
|
-
var network, account;
|
|
368
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
369
|
-
while (1) switch (_context.prev = _context.next) {
|
|
370
|
-
case 0:
|
|
371
|
-
network = Network.SOLANA;
|
|
372
|
-
if (publicKey) {
|
|
373
|
-
account = publicKey.toString();
|
|
374
|
-
updateAccounts([account]);
|
|
375
|
-
} else {
|
|
376
|
-
connect(network);
|
|
377
|
-
}
|
|
378
|
-
case 2:
|
|
379
|
-
case "end":
|
|
380
|
-
return _context.stop();
|
|
381
|
-
}
|
|
382
|
-
}, _callee);
|
|
383
|
-
}));
|
|
384
|
-
return function (_x) {
|
|
385
|
-
return _ref2.apply(this, arguments);
|
|
386
|
-
};
|
|
387
|
-
}());
|
|
388
|
-
};
|
|
389
|
-
var canSwitchNetworkTo = function canSwitchNetworkTo() {
|
|
390
|
-
return false;
|
|
391
|
-
};
|
|
392
|
-
var getSigners$1 = getSigners;
|
|
393
|
-
var getWalletInfo = function getWalletInfo(allBlockChains) {
|
|
394
|
-
var solana = solanaBlockchain(allBlockChains);
|
|
395
|
-
return {
|
|
396
|
-
name: 'Phantom',
|
|
397
|
-
img: 'https://raw.githubusercontent.com/rango-exchange/rango-types/main/assets/icons/wallets/phantom.svg',
|
|
398
|
-
installLink: {
|
|
399
|
-
CHROME: 'https://chrome.google.com/webstore/detail/phantom/bfnaelmomeimhlpmgjnjophhpkkoljpa',
|
|
400
|
-
DEFAULT: 'https://phantom.app/'
|
|
401
|
-
},
|
|
402
|
-
color: '#4d40c6',
|
|
403
|
-
supportedChains: solana
|
|
404
|
-
};
|
|
405
|
-
};
|
|
406
|
-
|
|
407
|
-
export { canSwitchNetworkTo, config, connect, getInstance, getSigners$1 as getSigners, getWalletInfo, subscribe };
|
|
408
|
-
//# sourceMappingURL=provider-phantom.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"provider-phantom.esm.js","sources":["../src/helpers.ts","../src/signer.ts","../src/index.ts"],"sourcesContent":["export function phantom() {\n if ('phantom' in window) {\n const instance = window.phantom?.solana;\n\n if (instance?.isPhantom) {\n return instance;\n }\n }\n\n return null;\n}\n","import { DefaultSolanaSigner } from '@rango-dev/signer-solana';\nimport { Network, getNetworkInstance } from '@rango-dev/wallets-shared';\nimport {\n DefaultSignerFactory,\n SignerFactory,\n TransactionType as TxType,\n} from 'rango-types';\n\nexport default function getSigners(provider: any): SignerFactory {\n const solProvider = getNetworkInstance(provider, Network.SOLANA);\n const signers = new DefaultSignerFactory();\n signers.registerSigner(TxType.SOLANA, new DefaultSolanaSigner(solProvider));\n return signers;\n}\n","import {\n Network,\n WalletTypes,\n CanSwitchNetwork,\n Connect,\n Subscribe,\n getSolanaAccounts,\n WalletInfo,\n} from '@rango-dev/wallets-shared';\nimport { phantom as phantom_instance } from './helpers';\nimport signer from './signer';\nimport { SignerFactory, BlockchainMeta, solanaBlockchain } from 'rango-types';\n\nconst WALLET = WalletTypes.PHANTOM;\n\nexport const config = {\n type: WALLET,\n};\n\nexport const getInstance = phantom_instance;\nexport const connect: Connect = getSolanaAccounts;\n\nexport const subscribe: Subscribe = ({ instance, updateAccounts, connect }) => {\n instance?.on('accountChanged', async (publicKey: string) => {\n const network = Network.SOLANA;\n if (publicKey) {\n const account = publicKey.toString();\n updateAccounts([account]);\n } else {\n connect(network);\n }\n });\n};\n\nexport const canSwitchNetworkTo: CanSwitchNetwork = () => false;\n\nexport const getSigners: (provider: any) => SignerFactory = signer;\n\nexport const getWalletInfo: (allBlockChains: BlockchainMeta[]) => WalletInfo = (\n allBlockChains\n) => {\n const solana = solanaBlockchain(allBlockChains);\n return {\n name: 'Phantom',\n img: 'https://raw.githubusercontent.com/rango-exchange/rango-types/main/assets/icons/wallets/phantom.svg',\n installLink: {\n CHROME:\n 'https://chrome.google.com/webstore/detail/phantom/bfnaelmomeimhlpmgjnjophhpkkoljpa',\n\n DEFAULT: 'https://phantom.app/',\n },\n color: '#4d40c6',\n supportedChains: solana,\n };\n};\n"],"names":["phantom","window","_window$phantom","instance","solana","isPhantom","getSigners","provider","solProvider","getNetworkInstance","Network","SOLANA","signers","DefaultSignerFactory","registerSigner","TxType","DefaultSolanaSigner","WALLET","WalletTypes","PHANTOM","config","type","getInstance","phantom_instance","connect","getSolanaAccounts","subscribe","_ref","updateAccounts","on","_ref2","_asyncToGenerator","_regeneratorRuntime","mark","_callee","publicKey","network","account","wrap","_callee$","_context","prev","next","toString","stop","_x","apply","arguments","canSwitchNetworkTo","signer","getWalletInfo","allBlockChains","solanaBlockchain","name","img","installLink","CHROME","DEFAULT","color","supportedChains"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAAgBA,OAAOA;EACrB,IAAI,SAAS,IAAIC,MAAM,EAAE;IAAA,IAAAC,eAAA;IACvB,IAAMC,QAAQ,IAAAD,eAAA,GAAGD,MAAM,CAACD,OAAO,qBAAdE,eAAA,CAAgBE,MAAM;IAEvC,IAAID,QAAQ,YAARA,QAAQ,CAAEE,SAAS,EAAE;MACvB,OAAOF,QAAQ;;;EAInB,OAAO,IAAI;AACb;;SCFwBG,UAAUA,CAACC,QAAa;EAC9C,IAAMC,WAAW,GAAGC,kBAAkB,CAACF,QAAQ,EAAEG,OAAO,CAACC,MAAM,CAAC;EAChE,IAAMC,OAAO,GAAG,IAAIC,oBAAoB,EAAE;EAC1CD,OAAO,CAACE,cAAc,CAACC,eAAM,CAACJ,MAAM,EAAE,IAAIK,mBAAmB,CAACR,WAAW,CAAC,CAAC;EAC3E,OAAOI,OAAO;AAChB;;ACAA,IAAMK,MAAM,GAAGC,WAAW,CAACC,OAAO;AAElC,IAAaC,MAAM,GAAG;EACpBC,IAAI,EAAEJ;CACP;AAED,IAAaK,WAAW,GAAGC;AAC3B,IAAaC,OAAO,GAAYC,iBAAiB;AAEjD,IAAaC,SAAS,GAAc,SAAvBA,SAASA,CAAAC,IAAA;MAAiBxB,QAAQ,GAAAwB,IAAA,CAARxB,QAAQ;IAAEyB,cAAc,GAAAD,IAAA,CAAdC,cAAc;IAAEJ,OAAO,GAAAG,IAAA,CAAPH,OAAO;EACtErB,QAAQ,oBAARA,QAAQ,CAAE0B,EAAE,CAAC,gBAAgB;IAAA,IAAAC,KAAA,GAAAC,iBAAA,eAAAC,mBAAA,GAAAC,IAAA,CAAE,SAAAC,QAAOC,SAAiB;MAAA,IAAAC,OAAA,EAAAC,OAAA;MAAA,OAAAL,mBAAA,GAAAM,IAAA,UAAAC,SAAAC,QAAA;QAAA,kBAAAA,QAAA,CAAAC,IAAA,GAAAD,QAAA,CAAAE,IAAA;UAAA;YAC/CN,OAAO,GAAG1B,OAAO,CAACC,MAAM;YAC9B,IAAIwB,SAAS,EAAE;cACPE,OAAO,GAAGF,SAAS,CAACQ,QAAQ,EAAE;cACpCf,cAAc,CAAC,CAACS,OAAO,CAAC,CAAC;aAC1B,MAAM;cACLb,OAAO,CAACY,OAAO,CAAC;;UACjB;UAAA;YAAA,OAAAI,QAAA,CAAAI,IAAA;;SAAAV,OAAA;KACF;IAAA,iBAAAW,EAAA;MAAA,OAAAf,KAAA,CAAAgB,KAAA,OAAAC,SAAA;;MAAC;AACJ,CAAC;AAED,IAAaC,kBAAkB,GAAqB,SAAvCA,kBAAkBA;EAAA,OAA2B,KAAK;AAAA;AAE/D,IAAa1C,YAAU,GAAqC2C;AAE5D,IAAaC,aAAa,GAAqD,SAAlEA,aAAaA,CACxBC,cAAc;EAEd,IAAM/C,MAAM,GAAGgD,gBAAgB,CAACD,cAAc,CAAC;EAC/C,OAAO;IACLE,IAAI,EAAE,SAAS;IACfC,GAAG,EAAE,oGAAoG;IACzGC,WAAW,EAAE;MACXC,MAAM,EACJ,oFAAoF;MAEtFC,OAAO,EAAE;KACV;IACDC,KAAK,EAAE,SAAS;IAChBC,eAAe,EAAEvD;GAClB;AACH,CAAC;;;;"}
|