Skip to content

Commit

Permalink
Merge branch 'main' of github.com:openfort-xyz/openfort-js into feat/…
Browse files Browse the repository at this point in the history
…facebook-oauth
  • Loading branch information
gllm-dev committed May 31, 2024
2 parents b764531 + ba4dca6 commit 73b037c
Show file tree
Hide file tree
Showing 43 changed files with 2,051 additions and 52 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.7.3] - 2024-05-31
### Fix
- Add export of EIP-1193 provider


## [0.7.2] - 2024-05-31
### Fix
- Add now authentication endpoints with openfort


## [0.7.1] - 2024-05-29
### Fix
- Add missing rollup configuration for the SDK with openapi code generation
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-react": "^7.34.1",
"events": "^3.1.0",
"husky": "^8.0.3",
"lint-staged": "^13.2.0",
"wsrun": "^5.2.4"
Expand Down
5 changes: 4 additions & 1 deletion sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"@ethersproject/abstract-signer": "^5.7.0",
"@ethersproject/bytes": "^5.7.0",
"@ethersproject/hash": "^5.7.0",
"@ethersproject/providers": "^5.7.0",
"@ethersproject/signing-key": "^5.7.0",
"@ethersproject/transactions": "^5.7.0",
"@noble/curves": "^1.1.0",
Expand All @@ -42,7 +43,8 @@
"crypto-js": "^4.2.0",
"es6-promise": "^4.2.8",
"jose": "^5.2.2",
"path": "^0.12.7"
"path": "^0.12.7",
"uuid": "^8.3.2"
},
"exports": {
"./package.json": "./package.json",
Expand All @@ -67,6 +69,7 @@
"@swc/jest": "^0.2.24",
"@types/crypto-js": "^4.2.2",
"@types/jest": "^29.4.3",
"@types/uuid": "^8.3.4",
"@typescript-eslint/eslint-plugin": "^5.57.1",
"@typescript-eslint/parser": "^5.57.1",
"buffer": "^5.5.0||^6.0.0",
Expand Down
4 changes: 2 additions & 2 deletions sdk/src/authManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
} from 'types';
import { SDKConfiguration } from 'config';
import { BackendApiClients } from '@openfort/openapi-clients';
import { isBrowser } from './lib/helpers';
import { isBrowser } from './utils/helpers';

export default class AuthManager {
private readonly config: SDKConfiguration;
Expand Down Expand Up @@ -275,7 +275,7 @@ export default class AuthManager {
headers: {
authorization: `Bearer ${this.config.baseConfiguration.publishableKey}`,
// eslint-disable-next-line @typescript-eslint/naming-convention
'player-token': accessToken,
'x-player-token': accessToken,
},
});
}
Expand Down
47 changes: 47 additions & 0 deletions sdk/src/chains/10200.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
const chain = {
chain: 'GNO',
chainId: 10200,
explorers: [
{
name: 'blockscout',
url: 'https://gnosis-chiado.blockscout.com',
standard: 'EIP3091',
icon: {
url: 'ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM',
width: 551,
height: 540,
format: 'png',
},
},
],
faucets: ['https://gnosisfaucet.com'],
icon: {
url: 'ipfs://bafybeidk4swpgdyqmpz6shd5onvpaujvwiwthrhypufnwr6xh3dausz2dm',
width: 1800,
height: 1800,
format: 'png',
},
infoURL: 'https://docs.gnosischain.com',
name: 'Gnosis Chiado Testnet',
nativeCurrency: {
name: 'Chiado xDAI',
symbol: 'XDAI',
decimals: 18,
},
networkId: 10200,
rpc: [
'https://rpc.chiadochain.net',
'https://rpc.chiado.gnosis.gateway.fm',
'wss://rpc.chiadochain.net/wss',
'https://gnosis-chiado-rpc.publicnode.com',
'wss://gnosis-chiado-rpc.publicnode.com',
'https://gnosis-chiado.drpc.org',
'wss://gnosis-chiado.drpc.org',
],
shortName: 'chi',
slip44: 1,
slug: 'gnosis-chiado-testnet',
testnet: true,
};

export default chain;
47 changes: 47 additions & 0 deletions sdk/src/chains/11155111.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
const chain = {
chain: 'ETH',
chainId: 11155111,
explorers: [
{
name: 'etherscan-sepolia',
url: 'https://sepolia.etherscan.io',
standard: 'EIP3091',
},
{
name: 'otterscan-sepolia',
url: 'https://sepolia.otterscan.io',
standard: 'EIP3091',
},
],
faucets: ['http://fauceth.komputing.org?chain=11155111'],
features: [],
icon: {
url: 'ipfs://QmcxZHpyJa8T4i63xqjPYrZ6tKrt55tZJpbXcjSDKuKaf9/ethereum/512.png',
width: 512,
height: 512,
format: 'png',
},
infoURL: 'https://sepolia.otterscan.io',
name: 'Sepolia',
nativeCurrency: {
name: 'Sepolia Ether',
symbol: 'ETH',
decimals: 18,
},
networkId: 11155111,
redFlags: [],
rpc: [
'https://rpc.sepolia.org',
'https://rpc2.sepolia.org',
'https://rpc-sepolia.rockx.com',
'https://rpc.sepolia.ethpandaops.io',
'https://sepolia.gateway.tenderly.co',
'https://ethereum-sepolia.publicnode.com',
],
shortName: 'sep',
slug: 'sepolia',
testnet: true,
title: 'Ethereum Testnet Sepolia',
};

export default chain;
38 changes: 38 additions & 0 deletions sdk/src/chains/13337.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
const chain = {
name: 'Beam Testnet',
chainId: 13337,
chain: 'BEAM',
shortName: 'Beam Testnet',
slug: 'beam-testnet',
features: [
{
name: 'EIP1559',
},
],
icon: {
url: 'ipfs://QmQJ21NWyGGDraicVEzS1Uqq1yXahM9NCuNZgnfYvtspdt',
height: 512,
width: 512,
format: 'png',
},
nativeCurrency: {
name: 'Beam',
symbol: 'BEAM',
decimals: 18,
},
rpc: [
'https://eu.build.onbeam.com/rpc/testnet/14bfbcc5-49c1-40e8-82c2-025c9a1834e1',
],
faucets: ['https://faucet.avax.network/?subnet=beam', 'https://faucet.onbeam.com'],
explorers: [
{
name: 'Beam Explorer',
url: 'https://subnets-test.avax.network/beam',
standard: 'EIP3091',
},
],
infoURL: 'https://www.onbeam.com',
testnet: true,
};

export default chain;
42 changes: 42 additions & 0 deletions sdk/src/chains/13371.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
const chain = {
chain: 'Immutable zkEVM',
chainId: 13371,
explorers: [
{
name: 'Immutable explorer',
url: 'https://explorer.immutable.com',
standard: 'EIP3091',
icon: {
url: 'ipfs://QmXFUYFW4e6wifbU9LKVq7owM14bnE6ZbbYq3bn1jBP3Mw',
width: 1168,
height: 1168,
format: 'png',
},
},
],
faucets: ['https://docs.immutable.com/docs/zkEVM/guides/faucet'],
icon: {
url: 'ipfs://QmXFUYFW4e6wifbU9LKVq7owM14bnE6ZbbYq3bn1jBP3Mw',
width: 1168,
height: 1168,
format: 'png',
},
infoURL: 'https://www.immutable.com',
name: 'Immutable zkEVM',
nativeCurrency: {
name: 'IMX',
symbol: 'IMX',
decimals: 18,
},
networkId: 13371,
rpc: [
'https://rpc.immutable.com',
'https://immutable-zkevm.drpc.org',
'wss://immutable-zkevm.drpc.org',
],
shortName: 'imx',
slug: 'immutable-zkevm',
testnet: false,
};

export default chain;
43 changes: 43 additions & 0 deletions sdk/src/chains/13473.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
const chain = {
chain: 'Immutable zkEVM',
chainId: 13473,
explorers: [
{
name: 'Immutable Testnet explorer',
url: 'https://explorer.testnet.immutable.com',
standard: 'EIP3091',
icon: {
url: 'ipfs://QmXFUYFW4e6wifbU9LKVq7owM14bnE6ZbbYq3bn1jBP3Mw',
width: 1168,
height: 1168,
format: 'png',
},
},
],
faucets: ['https://docs.immutable.com/docs/zkEVM/guides/faucet'],
icon: {
url: 'ipfs://QmXFUYFW4e6wifbU9LKVq7owM14bnE6ZbbYq3bn1jBP3Mw',
width: 1168,
height: 1168,
format: 'png',
},
infoURL: 'https://www.immutable.com',
name: 'Immutable zkEVM Testnet',
nativeCurrency: {
name: 'Test IMX',
symbol: 'tIMX',
decimals: 18,
},
networkId: 13473,
rpc: [
'https://rpc.testnet.immutable.com',
'https://immutable-zkevm-testnet.drpc.org',
'wss://immutable-zkevm-testnet.drpc.org',
],
shortName: 'imx-testnet',
slip44: 1,
slug: 'immutable-zkevm-testnet',
testnet: true,
};

export default chain;
57 changes: 57 additions & 0 deletions sdk/src/chains/137.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
const chain = {
chain: 'Polygon',
chainId: 137,
explorers: [
{
name: 'polygonscan',
url: 'https://polygonscan.com',
standard: 'EIP3091',
},
{
name: 'dexguru',
url: 'https://polygon.dex.guru',
standard: 'EIP3091',
icon: {
url: 'ipfs://QmRaASKRSjQ5btoUQ2rNTJNxKtx2a2RoewgA7DMQkLVEne',
width: 83,
height: 82,
format: 'svg',
},
},
],
faucets: [],
features: [],
icon: {
url: 'ipfs://QmcxZHpyJa8T4i63xqjPYrZ6tKrt55tZJpbXcjSDKuKaf9/polygon/512.png',
width: 512,
height: 512,
format: 'png',
},
infoURL: 'https://polygon.technology/',
name: 'Polygon Mainnet',
nativeCurrency: {
name: 'MATIC',
symbol: 'MATIC',
decimals: 18,
},
networkId: 137,
redFlags: [],
rpc: [
'https://polygon-rpc.com',
'https://rpc-mainnet.matic.network',
'https://matic-mainnet.chainstacklabs.com',
'https://rpc-mainnet.maticvigil.com',
'https://rpc-mainnet.matic.quiknode.pro',
'https://matic-mainnet-full-rpc.bwarelabs.com',
'https://polygon-bor.publicnode.com',
'wss://polygon-bor.publicnode.com',
'https://polygon.gateway.tenderly.co',
'wss://polygon.gateway.tenderly.co',
],
shortName: 'matic',
slip44: 966,
slug: 'polygon',
testnet: false,
};

export default chain;
33 changes: 33 additions & 0 deletions sdk/src/chains/28122024.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
const chain = {
chain: 'Ancient8',
chainId: 28122024,
explorers: [
{
name: 'scan-testnet',
url: 'https://scanv2-testnet.ancient8.gg',
standard: 'EIP3091',
},
],
faucets: [],
icon: {
url: 'ipfs://bafkreievnqg3xjokaty4kfbxxbrzm5v5y7exbaaia2txrh4sfgrqsalfym',
width: 128,
height: 128,
format: 'png',
},
infoURL: 'https://ancient8.gg/',
name: 'Ancient8 Testnet',
nativeCurrency: {
name: 'Ether',
symbol: 'ETH',
decimals: 18,
},
networkId: 28122024,
rpc: ['https://rpcv2-testnet.ancient8.gg'],
shortName: 'a8',
slip44: 1,
slug: 'ancient8-testnet',
testnet: true,
};

export default chain;
Loading

0 comments on commit 73b037c

Please sign in to comment.