@azuro-org/toolkit 5.0.1 → 5.1.0-beta.2
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/README.md +4 -4
- package/dist/abis/{FreeBet.d.ts → PayMaster.d.ts} +328 -164
- package/dist/abis/Relayer.d.ts +5 -0
- package/dist/abis/Vault.d.ts +762 -0
- package/dist/abis/index.d.ts +2 -1
- package/dist/config.d.ts +0 -1
- package/dist/docs/bets/bets.d.ts +3 -5
- package/dist/docs/bets/fragments/bet.d.ts +3 -5
- package/dist/docs/bets/fragments/legacyPrematchBet.d.ts +2 -0
- package/dist/docs/bets/legacyBets.d.ts +2 -0
- package/dist/docs/bets/types.d.ts +224 -0
- package/dist/docs/feed/fragments/gameInfo.d.ts +2 -0
- package/dist/docs/feed/game.d.ts +2 -0
- package/dist/docs/feed/games.d.ts +2 -0
- package/dist/docs/feed/sports.d.ts +2 -0
- package/dist/docs/feed/types.d.ts +21 -21
- package/dist/docs/legacy-live-feed/games.d.ts +2 -0
- package/dist/global.d.ts +26 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1264 -153
- package/dist/index.js.map +1 -0
- package/dist/utils/bonus/getAvailableFreebets.d.ts +16 -0
- package/dist/utils/bonus/getBonuses.d.ts +28 -0
- package/dist/utils/createBet.d.ts +1 -0
- package/dist/utils/createComboBet.d.ts +1 -0
- package/dist/utils/setupContracts.d.ts +12 -2
- package/package.json +11 -12
- package/dist/utils/getFreebets.d.ts +0 -35
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type Address } from 'viem';
|
|
2
|
+
import { type ChainId } from '../../config';
|
|
3
|
+
import { type Freebet, type Selection } from '../../global';
|
|
4
|
+
import { type RawBonus } from './getBonuses';
|
|
5
|
+
export type GetFreebetsResponse = {
|
|
6
|
+
bonuses: RawBonus[];
|
|
7
|
+
};
|
|
8
|
+
type Props = {
|
|
9
|
+
chainId: ChainId;
|
|
10
|
+
account: Address;
|
|
11
|
+
affiliate: Address;
|
|
12
|
+
selections: Selection[];
|
|
13
|
+
};
|
|
14
|
+
export type GetAvailableFreebets = Freebet[] | null;
|
|
15
|
+
export declare const getAvailableFreebets: ({ chainId, account, affiliate, selections }: Props) => Promise<GetAvailableFreebets>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type Address } from 'viem';
|
|
2
|
+
import { type ChainId } from '../../config';
|
|
3
|
+
import { type BonusType, type Bonus, type BonusStatus } from '../../global';
|
|
4
|
+
export type RawBonus = {
|
|
5
|
+
id: string;
|
|
6
|
+
bonusType: BonusType;
|
|
7
|
+
freebetParam: {
|
|
8
|
+
isBetSponsored: true;
|
|
9
|
+
isFeeSponsored: true;
|
|
10
|
+
isSponsoredBetReturnable: true;
|
|
11
|
+
};
|
|
12
|
+
address: string;
|
|
13
|
+
amount: string;
|
|
14
|
+
status: BonusStatus;
|
|
15
|
+
network: string;
|
|
16
|
+
currency: string;
|
|
17
|
+
expiresAt: string;
|
|
18
|
+
usedAt: string;
|
|
19
|
+
createdAt: string;
|
|
20
|
+
};
|
|
21
|
+
export type GetBonuses = Bonus[] | null;
|
|
22
|
+
type Props = {
|
|
23
|
+
chainId: ChainId;
|
|
24
|
+
account: Address;
|
|
25
|
+
affiliate: Address;
|
|
26
|
+
};
|
|
27
|
+
export declare const getBonuses: ({ chainId, account, affiliate }: Props) => Promise<GetBonuses>;
|
|
28
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Address } from 'viem';
|
|
2
|
-
import { lpAbi, coreAbi, azuroBetAbi, relayerAbi, cashoutAbi } from '../abis';
|
|
2
|
+
import { lpAbi, coreAbi, azuroBetAbi, relayerAbi, cashoutAbi, vaultAbi, paymasterAbi } from '../abis';
|
|
3
3
|
export type Contracts = {
|
|
4
4
|
lp: {
|
|
5
5
|
address: Address;
|
|
@@ -17,6 +17,14 @@ export type Contracts = {
|
|
|
17
17
|
address: Address;
|
|
18
18
|
abi: typeof azuroBetAbi;
|
|
19
19
|
};
|
|
20
|
+
vault: {
|
|
21
|
+
address: Address;
|
|
22
|
+
abi: typeof vaultAbi;
|
|
23
|
+
};
|
|
24
|
+
paymaster: {
|
|
25
|
+
address: Address;
|
|
26
|
+
abi: typeof paymasterAbi;
|
|
27
|
+
};
|
|
20
28
|
cashout?: {
|
|
21
29
|
address: Address;
|
|
22
30
|
abi: typeof cashoutAbi;
|
|
@@ -27,7 +35,9 @@ type Props = {
|
|
|
27
35
|
core: Address;
|
|
28
36
|
relayer: Address;
|
|
29
37
|
azuroBet: Address;
|
|
38
|
+
vault: Address;
|
|
39
|
+
paymaster: Address;
|
|
30
40
|
cashout?: Address;
|
|
31
41
|
};
|
|
32
|
-
export declare const setupContracts: ({ lp, core, relayer, azuroBet, cashout, }: Props) => Contracts;
|
|
42
|
+
export declare const setupContracts: ({ lp, core, relayer, azuroBet, vault, paymaster, cashout, }: Props) => Contracts;
|
|
33
43
|
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azuro-org/toolkit",
|
|
3
|
-
"version": "5.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "5.1.0-beta.2",
|
|
4
|
+
"description": "This framework-agnostic package provides essential utilities for building applications on the Azuro Protocol.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"type": "module",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"gql:cleanup": "rimraf src/docs/**/*.ts src/docs/**/**/*.ts",
|
|
16
16
|
"gql": "npm run gql:cleanup & graphql-codegen",
|
|
17
17
|
"dev": "rollup -cw",
|
|
18
|
-
"build": "rimraf ./dist && npm run gql && rollup -c --compact",
|
|
18
|
+
"build": "rimraf ./dist && npm run gql && tsc --emitDeclarationOnly && rollup -c --compact",
|
|
19
19
|
"prepublishOnly": "npm run build",
|
|
20
20
|
"------------------ Lint --------------------------------------------------------------------------------": "",
|
|
21
21
|
"lint": "next lint && tsc --noEmit",
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
"azuro",
|
|
27
27
|
"azuro-protocol",
|
|
28
28
|
"toolkit",
|
|
29
|
-
"helpers"
|
|
29
|
+
"helpers",
|
|
30
|
+
"framework agnostic"
|
|
30
31
|
],
|
|
31
32
|
"repository": {
|
|
32
33
|
"type": "git",
|
|
@@ -39,10 +40,10 @@
|
|
|
39
40
|
},
|
|
40
41
|
"homepage": "https://github.com/Azuro-protocol/toolkit#readme",
|
|
41
42
|
"peerDependencies": {
|
|
42
|
-
"@azuro-org/dictionaries": "^3.0.
|
|
43
|
+
"@azuro-org/dictionaries": "^3.0.27",
|
|
44
|
+
"@wagmi/core": "^2.17.2",
|
|
43
45
|
"graphql-tag": "^2.12.6",
|
|
44
|
-
"
|
|
45
|
-
"viem": "^2.29.0"
|
|
46
|
+
"viem": "^2.30.4"
|
|
46
47
|
},
|
|
47
48
|
"devDependencies": {
|
|
48
49
|
"@babel/core": "^7.17.0",
|
|
@@ -51,8 +52,7 @@
|
|
|
51
52
|
"@graphql-codegen/typescript": "^4.1.2",
|
|
52
53
|
"@graphql-codegen/typescript-document-nodes": "^4.0.12",
|
|
53
54
|
"@graphql-codegen/typescript-operations": "^4.4.0",
|
|
54
|
-
"@rollup/plugin-
|
|
55
|
-
"@rollup/plugin-commonjs": "^23.0.3",
|
|
55
|
+
"@rollup/plugin-commonjs": "^23.0.7",
|
|
56
56
|
"@rollup/plugin-json": "^4.1.0",
|
|
57
57
|
"@types/node": "^17.0.21",
|
|
58
58
|
"@typescript-eslint/eslint-plugin": "^6.19.1",
|
|
@@ -62,10 +62,9 @@
|
|
|
62
62
|
"eslint-plugin-import": "^2.29.1",
|
|
63
63
|
"minimist": "^1.2.7",
|
|
64
64
|
"rimraf": "^3.0.2",
|
|
65
|
-
"rollup": "^2.
|
|
66
|
-
"rollup-plugin-babel": "^4.4.0",
|
|
65
|
+
"rollup": "^2.79.2",
|
|
67
66
|
"rollup-plugin-typescript2": "^0.34.1",
|
|
68
67
|
"tslib": "^2.4.1",
|
|
69
|
-
"typescript": "^5.
|
|
68
|
+
"typescript": "^5.8.3"
|
|
70
69
|
}
|
|
71
70
|
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { type Hex, type Address } from 'viem';
|
|
2
|
-
import { type ChainId } from '../config';
|
|
3
|
-
export declare enum FreeBetStatus {
|
|
4
|
-
New = "New",
|
|
5
|
-
Claimed = "Claimed",
|
|
6
|
-
Redeemed = "Redeemed",
|
|
7
|
-
Canceled = "Canceled",
|
|
8
|
-
Reissued = "Reissued",
|
|
9
|
-
Withdrawn = "Withdrawn"
|
|
10
|
-
}
|
|
11
|
-
export type FreeBet = {
|
|
12
|
-
id: number;
|
|
13
|
-
owner: Address;
|
|
14
|
-
amount: string;
|
|
15
|
-
minOdds: string;
|
|
16
|
-
contractId: number;
|
|
17
|
-
signature: Hex;
|
|
18
|
-
expiresAt: number;
|
|
19
|
-
campaign: string;
|
|
20
|
-
status: FreeBetStatus;
|
|
21
|
-
contract: {
|
|
22
|
-
id: number;
|
|
23
|
-
affiliate: Address;
|
|
24
|
-
chainId: string;
|
|
25
|
-
freebetContractAddress: Address;
|
|
26
|
-
decimals: number;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
type Props = {
|
|
30
|
-
chainId: ChainId;
|
|
31
|
-
account: Address;
|
|
32
|
-
affiliate: Address;
|
|
33
|
-
};
|
|
34
|
-
export declare const getFreeBets: ({ chainId, account, affiliate }: Props) => Promise<never[]>;
|
|
35
|
-
export {};
|