@folks-router/js-sdk 0.0.3 → 0.0.4
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/FolksRouterClient.d.mts +11 -0
- package/dist/FolksRouterClient.d.ts +11 -0
- package/dist/FolksRouterClient.js +8 -0
- package/dist/FolksRouterClient.js.map +1 -0
- package/dist/FolksRouterClient.mjs +8 -0
- package/dist/FolksRouterClient.mjs.map +1 -0
- package/dist/abiContracts/index.d.mts +5 -0
- package/dist/abiContracts/index.d.ts +5 -0
- package/dist/abiContracts/index.js +7 -0
- package/dist/abiContracts/index.js.map +1 -0
- package/dist/abiContracts/index.mjs +7 -0
- package/dist/abiContracts/index.mjs.map +1 -0
- package/dist/chunk-3LWHLTYR.js +17 -0
- package/dist/chunk-3LWHLTYR.js.map +1 -0
- package/dist/chunk-3SISBSYJ.mjs +15 -0
- package/dist/chunk-3SISBSYJ.mjs.map +1 -0
- package/dist/chunk-5KRFY72J.js +15 -0
- package/dist/chunk-5KRFY72J.js.map +1 -0
- package/dist/chunk-6756PQ2I.mjs +207 -0
- package/dist/chunk-6756PQ2I.mjs.map +1 -0
- package/dist/chunk-BDETNMUS.mjs +39 -0
- package/dist/chunk-BDETNMUS.mjs.map +1 -0
- package/dist/chunk-BG4SYX7Y.js +56 -0
- package/dist/chunk-BG4SYX7Y.js.map +1 -0
- package/dist/chunk-P22I3FWL.mjs +7 -0
- package/dist/chunk-P22I3FWL.mjs.map +1 -0
- package/dist/chunk-PFXLGIPX.js +207 -0
- package/dist/chunk-PFXLGIPX.js.map +1 -0
- package/dist/chunk-S2SNZROA.mjs +106 -0
- package/dist/chunk-S2SNZROA.mjs.map +1 -0
- package/dist/chunk-T37SGVC7.js +7 -0
- package/dist/chunk-T37SGVC7.js.map +1 -0
- package/dist/chunk-UBG6SOYP.js +39 -0
- package/dist/chunk-UBG6SOYP.js.map +1 -0
- package/dist/chunk-VT2DNZR6.js +106 -0
- package/dist/chunk-VT2DNZR6.js.map +1 -0
- package/dist/chunk-XVPB7BHI.js +7 -0
- package/dist/chunk-XVPB7BHI.js.map +1 -0
- package/dist/chunk-Z537KBSF.mjs +7 -0
- package/dist/chunk-Z537KBSF.mjs.map +1 -0
- package/dist/chunk-ZDVIQZ3R.mjs +56 -0
- package/dist/chunk-ZDVIQZ3R.mjs.map +1 -0
- package/dist/chunk-ZTQMUDZG.mjs +17 -0
- package/dist/chunk-ZTQMUDZG.mjs.map +1 -0
- package/dist/constants/mainnetConstants.d.mts +3 -0
- package/dist/constants/mainnetConstants.d.ts +3 -0
- package/dist/constants/mainnetConstants.js +7 -0
- package/dist/constants/mainnetConstants.js.map +1 -0
- package/dist/constants/mainnetConstants.mjs +7 -0
- package/dist/constants/mainnetConstants.mjs.map +1 -0
- package/dist/constants/testnetConstants.d.mts +3 -0
- package/dist/constants/testnetConstants.d.ts +3 -0
- package/dist/constants/testnetConstants.js +7 -0
- package/dist/constants/testnetConstants.js.map +1 -0
- package/dist/constants/testnetConstants.mjs +7 -0
- package/dist/constants/testnetConstants.mjs.map +1 -0
- package/dist/index.d.mts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +38 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +38 -0
- package/dist/index.mjs.map +1 -0
- package/dist/referrer.d.mts +8 -0
- package/dist/referrer.d.ts +8 -0
- package/dist/referrer.js +12 -0
- package/dist/referrer.js.map +1 -0
- package/dist/referrer.mjs +12 -0
- package/dist/referrer.mjs.map +1 -0
- package/dist/swap.d.mts +5 -0
- package/dist/swap.d.ts +5 -0
- package/dist/swap.js +9 -0
- package/dist/swap.js.map +1 -0
- package/dist/swap.mjs +9 -0
- package/dist/swap.mjs.map +1 -0
- package/dist/types.d.mts +21 -0
- package/dist/types.d.ts +21 -0
- package/dist/types.js +9 -0
- package/dist/types.js.map +1 -0
- package/dist/types.mjs +9 -0
- package/dist/types.mjs.map +1 -0
- package/dist/utils.d.mts +9 -0
- package/dist/utils.d.ts +9 -0
- package/dist/utils.js +9 -0
- package/dist/utils.js.map +1 -0
- package/dist/utils.mjs +9 -0
- package/dist/utils.mjs.map +1 -0
- package/package.json +8 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { getReferrerLogicSig, prepareClaimReferrerFees, prepareReferrerOptIntoAsset } from './referrer.mjs';
|
|
2
|
+
export { prepareEnableAssetToBeSwapped } from './swap.mjs';
|
|
3
|
+
export { Network, ReferrerGroupTransaction, SwapMode, SwapQuote, SwapTransactions } from './types.mjs';
|
|
4
|
+
export { routerABIContract } from './abiContracts/index.mjs';
|
|
5
|
+
export { MainnetFolksRouterAppId } from './constants/mainnetConstants.mjs';
|
|
6
|
+
export { TestnetFolksRouterAppId } from './constants/testnetConstants.mjs';
|
|
7
|
+
export { FolksRouterClient } from './FolksRouterClient.mjs';
|
|
8
|
+
import 'algosdk';
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { getReferrerLogicSig, prepareClaimReferrerFees, prepareReferrerOptIntoAsset } from './referrer.js';
|
|
2
|
+
export { prepareEnableAssetToBeSwapped } from './swap.js';
|
|
3
|
+
export { Network, ReferrerGroupTransaction, SwapMode, SwapQuote, SwapTransactions } from './types.js';
|
|
4
|
+
export { routerABIContract } from './abiContracts/index.js';
|
|
5
|
+
export { MainnetFolksRouterAppId } from './constants/mainnetConstants.js';
|
|
6
|
+
export { TestnetFolksRouterAppId } from './constants/testnetConstants.js';
|
|
7
|
+
export { FolksRouterClient } from './FolksRouterClient.js';
|
|
8
|
+
import 'algosdk';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkT37SGVC7js = require('./chunk-T37SGVC7.js');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkBG4SYX7Yjs = require('./chunk-BG4SYX7Y.js');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
var _chunkPFXLGIPXjs = require('./chunk-PFXLGIPX.js');
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
var _chunkUBG6SOYPjs = require('./chunk-UBG6SOYP.js');
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
var _chunk3LWHLTYRjs = require('./chunk-3LWHLTYR.js');
|
|
19
|
+
require('./chunk-5KRFY72J.js');
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
var _chunkVT2DNZR6js = require('./chunk-VT2DNZR6.js');
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
var _chunkXVPB7BHIjs = require('./chunk-XVPB7BHI.js');
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
exports.FolksRouterClient = _chunkBG4SYX7Yjs.FolksRouterClient; exports.MainnetFolksRouterAppId = _chunkXVPB7BHIjs.MainnetFolksRouterAppId; exports.Network = _chunk3LWHLTYRjs.Network; exports.SwapMode = _chunk3LWHLTYRjs.SwapMode; exports.TestnetFolksRouterAppId = _chunkT37SGVC7js.TestnetFolksRouterAppId; exports.getReferrerLogicSig = _chunkPFXLGIPXjs.getReferrerLogicSig; exports.prepareClaimReferrerFees = _chunkPFXLGIPXjs.prepareClaimReferrerFees; exports.prepareEnableAssetToBeSwapped = _chunkUBG6SOYPjs.prepareEnableAssetToBeSwapped; exports.prepareReferrerOptIntoAsset = _chunkPFXLGIPXjs.prepareReferrerOptIntoAsset; exports.routerABIContract = _chunkVT2DNZR6js.routerABIContract;
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TestnetFolksRouterAppId
|
|
3
|
+
} from "./chunk-P22I3FWL.mjs";
|
|
4
|
+
import {
|
|
5
|
+
FolksRouterClient
|
|
6
|
+
} from "./chunk-ZDVIQZ3R.mjs";
|
|
7
|
+
import {
|
|
8
|
+
getReferrerLogicSig,
|
|
9
|
+
prepareClaimReferrerFees,
|
|
10
|
+
prepareReferrerOptIntoAsset
|
|
11
|
+
} from "./chunk-6756PQ2I.mjs";
|
|
12
|
+
import {
|
|
13
|
+
prepareEnableAssetToBeSwapped
|
|
14
|
+
} from "./chunk-BDETNMUS.mjs";
|
|
15
|
+
import {
|
|
16
|
+
Network,
|
|
17
|
+
SwapMode
|
|
18
|
+
} from "./chunk-ZTQMUDZG.mjs";
|
|
19
|
+
import "./chunk-3SISBSYJ.mjs";
|
|
20
|
+
import {
|
|
21
|
+
routerABIContract
|
|
22
|
+
} from "./chunk-S2SNZROA.mjs";
|
|
23
|
+
import {
|
|
24
|
+
MainnetFolksRouterAppId
|
|
25
|
+
} from "./chunk-Z537KBSF.mjs";
|
|
26
|
+
export {
|
|
27
|
+
FolksRouterClient,
|
|
28
|
+
MainnetFolksRouterAppId,
|
|
29
|
+
Network,
|
|
30
|
+
SwapMode,
|
|
31
|
+
TestnetFolksRouterAppId,
|
|
32
|
+
getReferrerLogicSig,
|
|
33
|
+
prepareClaimReferrerFees,
|
|
34
|
+
prepareEnableAssetToBeSwapped,
|
|
35
|
+
prepareReferrerOptIntoAsset,
|
|
36
|
+
routerABIContract
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LogicSigAccount, SuggestedParams } from 'algosdk';
|
|
2
|
+
import { ReferrerGroupTransaction } from './types.mjs';
|
|
3
|
+
|
|
4
|
+
declare function getReferrerLogicSig(referrerAddr: string): LogicSigAccount;
|
|
5
|
+
declare function prepareReferrerOptIntoAsset(senderAddr: string, referrerAddr: string, assetId: number, params: SuggestedParams): ReferrerGroupTransaction;
|
|
6
|
+
declare function prepareClaimReferrerFees(senderAddr: string, referrerAddr: string, assetId: number, amount: number | bigint, params: SuggestedParams): ReferrerGroupTransaction;
|
|
7
|
+
|
|
8
|
+
export { getReferrerLogicSig, prepareClaimReferrerFees, prepareReferrerOptIntoAsset };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LogicSigAccount, SuggestedParams } from 'algosdk';
|
|
2
|
+
import { ReferrerGroupTransaction } from './types.js';
|
|
3
|
+
|
|
4
|
+
declare function getReferrerLogicSig(referrerAddr: string): LogicSigAccount;
|
|
5
|
+
declare function prepareReferrerOptIntoAsset(senderAddr: string, referrerAddr: string, assetId: number, params: SuggestedParams): ReferrerGroupTransaction;
|
|
6
|
+
declare function prepareClaimReferrerFees(senderAddr: string, referrerAddr: string, assetId: number, amount: number | bigint, params: SuggestedParams): ReferrerGroupTransaction;
|
|
7
|
+
|
|
8
|
+
export { getReferrerLogicSig, prepareClaimReferrerFees, prepareReferrerOptIntoAsset };
|
package/dist/referrer.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var _chunkPFXLGIPXjs = require('./chunk-PFXLGIPX.js');
|
|
6
|
+
require('./chunk-5KRFY72J.js');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
exports.getReferrerLogicSig = _chunkPFXLGIPXjs.getReferrerLogicSig; exports.prepareClaimReferrerFees = _chunkPFXLGIPXjs.prepareClaimReferrerFees; exports.prepareReferrerOptIntoAsset = _chunkPFXLGIPXjs.prepareReferrerOptIntoAsset;
|
|
12
|
+
//# sourceMappingURL=referrer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getReferrerLogicSig,
|
|
3
|
+
prepareClaimReferrerFees,
|
|
4
|
+
prepareReferrerOptIntoAsset
|
|
5
|
+
} from "./chunk-6756PQ2I.mjs";
|
|
6
|
+
import "./chunk-3SISBSYJ.mjs";
|
|
7
|
+
export {
|
|
8
|
+
getReferrerLogicSig,
|
|
9
|
+
prepareClaimReferrerFees,
|
|
10
|
+
prepareReferrerOptIntoAsset
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=referrer.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/swap.d.mts
ADDED
package/dist/swap.d.ts
ADDED
package/dist/swap.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkUBG6SOYPjs = require('./chunk-UBG6SOYP.js');
|
|
4
|
+
require('./chunk-5KRFY72J.js');
|
|
5
|
+
require('./chunk-VT2DNZR6.js');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
exports.prepareEnableAssetToBeSwapped = _chunkUBG6SOYPjs.prepareEnableAssetToBeSwapped;
|
|
9
|
+
//# sourceMappingURL=swap.js.map
|
package/dist/swap.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
package/dist/swap.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/types.d.mts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type ReferrerGroupTransaction = {
|
|
2
|
+
unsignedTxn: Uint8Array;
|
|
3
|
+
lsig?: Uint8Array;
|
|
4
|
+
}[];
|
|
5
|
+
declare enum Network {
|
|
6
|
+
MAINNET = "mainnet",
|
|
7
|
+
TESTNET = "testnet"
|
|
8
|
+
}
|
|
9
|
+
declare enum SwapMode {
|
|
10
|
+
FIXED_INPUT = "FIXED_INPUT",
|
|
11
|
+
FIXED_OUTPUT = "FIXED_OUTPUT"
|
|
12
|
+
}
|
|
13
|
+
interface SwapQuote {
|
|
14
|
+
quoteAmount: bigint;
|
|
15
|
+
priceImpact: number;
|
|
16
|
+
microalgoTxnsFee: number;
|
|
17
|
+
txnPayload: string;
|
|
18
|
+
}
|
|
19
|
+
type SwapTransactions = string[];
|
|
20
|
+
|
|
21
|
+
export { Network, ReferrerGroupTransaction, SwapMode, SwapQuote, SwapTransactions };
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type ReferrerGroupTransaction = {
|
|
2
|
+
unsignedTxn: Uint8Array;
|
|
3
|
+
lsig?: Uint8Array;
|
|
4
|
+
}[];
|
|
5
|
+
declare enum Network {
|
|
6
|
+
MAINNET = "mainnet",
|
|
7
|
+
TESTNET = "testnet"
|
|
8
|
+
}
|
|
9
|
+
declare enum SwapMode {
|
|
10
|
+
FIXED_INPUT = "FIXED_INPUT",
|
|
11
|
+
FIXED_OUTPUT = "FIXED_OUTPUT"
|
|
12
|
+
}
|
|
13
|
+
interface SwapQuote {
|
|
14
|
+
quoteAmount: bigint;
|
|
15
|
+
priceImpact: number;
|
|
16
|
+
microalgoTxnsFee: number;
|
|
17
|
+
txnPayload: string;
|
|
18
|
+
}
|
|
19
|
+
type SwapTransactions = string[];
|
|
20
|
+
|
|
21
|
+
export { Network, ReferrerGroupTransaction, SwapMode, SwapQuote, SwapTransactions };
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunk3LWHLTYRjs = require('./chunk-3LWHLTYR.js');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
exports.Network = _chunk3LWHLTYRjs.Network; exports.SwapMode = _chunk3LWHLTYRjs.SwapMode;
|
|
9
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
package/dist/types.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/utils.d.mts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SuggestedParams, Transaction } from 'algosdk';
|
|
2
|
+
|
|
3
|
+
declare const signer: () => Promise<never[]>;
|
|
4
|
+
/**
|
|
5
|
+
* Transfer algo or asset. 0 assetId indicates algo transfer, else asset transfer.
|
|
6
|
+
*/
|
|
7
|
+
declare function transferAlgoOrAsset(assetId: number, from: string, to: string, amount: number | bigint, params: SuggestedParams): Transaction;
|
|
8
|
+
|
|
9
|
+
export { signer, transferAlgoOrAsset };
|
package/dist/utils.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SuggestedParams, Transaction } from 'algosdk';
|
|
2
|
+
|
|
3
|
+
declare const signer: () => Promise<never[]>;
|
|
4
|
+
/**
|
|
5
|
+
* Transfer algo or asset. 0 assetId indicates algo transfer, else asset transfer.
|
|
6
|
+
*/
|
|
7
|
+
declare function transferAlgoOrAsset(assetId: number, from: string, to: string, amount: number | bigint, params: SuggestedParams): Transaction;
|
|
8
|
+
|
|
9
|
+
export { signer, transferAlgoOrAsset };
|
package/dist/utils.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunk5KRFY72Jjs = require('./chunk-5KRFY72J.js');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
exports.signer = _chunk5KRFY72Jjs.signer; exports.transferAlgoOrAsset = _chunk5KRFY72Jjs.transferAlgoOrAsset;
|
|
9
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
package/dist/utils.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@folks-router/js-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/Folks-Finance/folks-router.git",
|
|
8
|
+
"directory": "packages/folks-router-js-sdk"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://folksrouter.io",
|
|
5
11
|
"main": "dist/index.js",
|
|
6
12
|
"module": "dist/index.mjs",
|
|
7
13
|
"types": "dist/index.d.ts",
|
|
@@ -13,6 +19,7 @@
|
|
|
13
19
|
"require": "./dist/index.js"
|
|
14
20
|
}
|
|
15
21
|
},
|
|
22
|
+
"sideEffects": false,
|
|
16
23
|
"files": [
|
|
17
24
|
"dist/**/*",
|
|
18
25
|
"README.md",
|